diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2024-02-12 19:18:05 +0100 |
|---|---|---|
| committer | Jeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com> | 2024-02-19 14:15:07 +0100 |
| commit | 74e36f0ead717105f26087c2cab08b41ba5a7ce8 (patch) | |
| tree | 1eb2b7516bea705c9b5a50ce0965e170414ed880 /types/cookie | |
| parent | 682d70091af2044ff6d8b350da9dff13163232e2 (diff) | |
All: Document everything to pass revive lint
Diffstat (limited to 'types/cookie')
| -rw-r--r-- | types/cookie/cookie.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/types/cookie/cookie.go b/types/cookie/cookie.go index 1714682..48c8dbf 100644 --- a/types/cookie/cookie.go +++ b/types/cookie/cookie.go @@ -1,4 +1,4 @@ -// package cookie implements a specialized version of a context +// Package cookie implements a specialized version of a context // - It is cancellable // - It has a channel associated with it to reply to state callbacks // - It can be marshalled by having a cgo Handle attached to it @@ -12,6 +12,8 @@ import ( "runtime/cgo" ) +// Cookie is the cookie which is just a context with some other data associated with it +// We could potentially only uses contexts with values, but this is nicer for type checking type Cookie struct { c chan string ctx context.Context @@ -19,8 +21,10 @@ type Cookie struct { H cgo.Handle } +// contextt is the context type for the value type contextt int8 +// CONTEXTK is the key of the cookie const CONTEXTK contextt = 0 // NewWithContext creates a new cookie with a context |
