diff options
Diffstat (limited to 'vendor/github.com/SevereCloud/vksdk/v2/longpoll-bot/context.go')
-rw-r--r-- | vendor/github.com/SevereCloud/vksdk/v2/longpoll-bot/context.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/longpoll-bot/context.go b/vendor/github.com/SevereCloud/vksdk/v2/longpoll-bot/context.go new file mode 100644 index 00000000..cfc4fd90 --- /dev/null +++ b/vendor/github.com/SevereCloud/vksdk/v2/longpoll-bot/context.go @@ -0,0 +1,12 @@ +package longpoll // import "github.com/SevereCloud/vksdk/v2/longpoll-bot" + +import ( + "context" + + "github.com/SevereCloud/vksdk/v2/internal" +) + +// TsFromContext returns the ts from context. +func TsFromContext(ctx context.Context) int { + return ctx.Value(internal.LongPollTsKey).(int) +} |