diff options
Diffstat (limited to 'vendor/github.com/SevereCloud/vksdk/v2/events/context.go')
-rw-r--r-- | vendor/github.com/SevereCloud/vksdk/v2/events/context.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/events/context.go b/vendor/github.com/SevereCloud/vksdk/v2/events/context.go new file mode 100644 index 00000000..91264cc7 --- /dev/null +++ b/vendor/github.com/SevereCloud/vksdk/v2/events/context.go @@ -0,0 +1,17 @@ +package events // import "github.com/SevereCloud/vksdk/v2/events" + +import ( + "context" + + "github.com/SevereCloud/vksdk/v2/internal" +) + +// GroupIDFromContext returns the GroupID from context. +func GroupIDFromContext(ctx context.Context) int { + return ctx.Value(internal.GroupIDKey).(int) +} + +// EventIDFromContext returns the EventID from context. +func EventIDFromContext(ctx context.Context) string { + return ctx.Value(internal.EventIDKey).(string) +} |