1
0
Fork 0
golang-github-pocketbase-ty.../test/c/c.go
Daniel Baumann b6e042e2af
Adding upstream version 0.0~git20250307.c2e6a77.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-05-22 11:21:48 +02:00

59 lines
897 B
Go

package c
import "time"
// func type comment
type Handler func() string // after
type Raw []byte
type Example1 struct {
Name string
}
// Example:
//
// Some
// code
// sample
type Example2 struct {
Title string
Json Raw
Bytes []byte // should be union
}
func (e *Example1) DemoEx1() string {
return ""
}
func (e *Example2) DemoEx2() time.Time {
return time.Time{}
}
// Pointer as argument vs return type
func (e *Example2) DemoEx3(arg *Example1) (*Example1, error) {
return nil, nil
}
// ommited types
func (e *Example2) DemoEx4(n1, n2, n3 string) {
}
// ommited names
func (e *Example2) DemoEx5(string, int) {
}
// named return values
func (e *Example2) DemoEx6() (b int, c string) {
return
}
// shortened return values
func (e *Example2) DemoEx7() (b, c string) {
return
}
// named and shortened return values
func (e *Example2) DemoEx8() (a int, b, c string) {
return
}