| 1 | // package a docs |
| 2 | // lorem ipsum dolor... |
| 3 | package ascip-go gomod github.com/pocketbase/tygoja . `github.com/pocketbase/tygoja/test/a`/ |
| 4 | |
| 5 | import "timescip-go gomod github.com/golang/go/src go1.22.0 time/" |
| 6 | |
| 7 | // ------------------------------------------------------------------- |
| 8 | // variables (note: currently are ignored) |
| 9 | // ------------------------------------------------------------------- |
| 10 | |
| 11 | var unexportedVarscip-go gomod github.com/pocketbase/tygoja . `github.com/pocketbase/tygoja/test/a`/unexportedVar. int = 123 |
| 12 | |
| 13 | // comment |
| 14 | var VarAscip-go gomod github.com/pocketbase/tygoja . `github.com/pocketbase/tygoja/test/a`/VarA. = 123 // after |
| 15 | |
| 16 | var VarBscip-go gomod github.com/pocketbase/tygoja . `github.com/pocketbase/tygoja/test/a`/VarB. any = "test" |
| 17 | |
| 18 | // external package type |
| 19 | var VarCscip-go gomod github.com/pocketbase/tygoja . `github.com/pocketbase/tygoja/test/a`/VarC. timescip-go gomod github.com/golang/go/src go1.22.0 time/.Timescip-go gomod github.com/golang/go/src go1.22.0 time/Time# = timescip-go gomod github.com/golang/go/src go1.22.0 time/.Nowscip-go gomod github.com/golang/go/src go1.22.0 time/Now().() |
| 20 | |
| 21 | // chan |
| 22 | var VarDscip-go gomod github.com/pocketbase/tygoja . `github.com/pocketbase/tygoja/test/a`/VarD. = make(chan int) |
| 23 | |
| 24 | // composite |
| 25 | var VarEscip-go gomod github.com/pocketbase/tygoja . `github.com/pocketbase/tygoja/test/a`/VarE. = map[string]func(){"test": func() {}} |
| 26 | |
| 27 | // ------------------------------------------------------------------- |
| 28 | // constants |
| 29 | // ------------------------------------------------------------------- |
| 30 | |
| 31 | const unexportedConstscip-go gomod github.com/pocketbase/tygoja . `github.com/pocketbase/tygoja/test/a`/unexportedConst. = "123" |
| 32 | |
| 33 | // comment |
| 34 | const ConstAscip-go gomod github.com/pocketbase/tygoja . `github.com/pocketbase/tygoja/test/a`/ConstA. string = "test" // after |
| 35 | |
| 36 | // multi |
| 37 | // line |
| 38 | // comment |
| 39 | const ConstBscip-go gomod github.com/pocketbase/tygoja . `github.com/pocketbase/tygoja/test/a`/ConstB. = 123 |
| 40 | |
| 41 | // some generic group comment |
| 42 | const ( |
| 43 | ConstC0scip-go gomod github.com/pocketbase/tygoja . `github.com/pocketbase/tygoja/test/a`/ConstC0. = iota |
| 44 | ConstC1scip-go gomod github.com/pocketbase/tygoja . `github.com/pocketbase/tygoja/test/a`/ConstC1. // after |
| 45 | ConstC2scip-go gomod github.com/pocketbase/tygoja . `github.com/pocketbase/tygoja/test/a`/ConstC2. |
| 46 | ) |
| 47 | |
| 48 | // ------------------------------------------------------------------- |
| 49 | // type alias with methods |
| 50 | // ------------------------------------------------------------------- |
| 51 | |
| 52 | // type comment |
| 53 | type SliceAliasscip-go gomod github.com/pocketbase/tygoja . `github.com/pocketbase/tygoja/test/a`/SliceAlias#[T any] []T // after |
| 54 | |
| 55 | // func comment |
| 56 | func (s SliceAliasscip-go gomod github.com/pocketbase/tygoja . `github.com/pocketbase/tygoja/test/a`/SliceAlias#[T]) funcAscip-go gomod github.com/pocketbase/tygoja . `github.com/pocketbase/tygoja/test/a`/SliceAlias#funcA().() { |
| 57 | } |
| 58 | |
| 59 | // multi |
| 60 | // line |
| 61 | // comment |
| 62 | func (s SliceAliasscip-go gomod github.com/pocketbase/tygoja . `github.com/pocketbase/tygoja/test/a`/SliceAlias#[T]) funcBscip-go gomod github.com/pocketbase/tygoja . `github.com/pocketbase/tygoja/test/a`/SliceAlias#funcB().(argA, argB int) { |
| 63 | } |
| 64 | |
| 65 | func (s SliceAliasscip-go gomod github.com/pocketbase/tygoja . `github.com/pocketbase/tygoja/test/a`/SliceAlias#[T]) funcCscip-go gomod github.com/pocketbase/tygoja . `github.com/pocketbase/tygoja/test/a`/SliceAlias#funcC().(argA int, argB ...string) (a T, b int, c error) { |
| 66 | return |
| 67 | } |
| 68 | |
| 69 | // ------------------------------------------------------------------- |
| 70 | // function type |
| 71 | // ------------------------------------------------------------------- |
| 72 | |
| 73 | // multi |
| 74 | // line |
| 75 | // comment |
| 76 | type Handlerscip-go gomod github.com/pocketbase/tygoja . `github.com/pocketbase/tygoja/test/a`/Handler#[T comparable] func() (T, int) // after |