shad-go/illegal/internal/struct.go

24 lines
289 B
Go
Raw Permalink Normal View History

2022-02-10 22:06:57 +00:00
//go:build !change
2021-04-14 15:41:01 +00:00
package internal
import "fmt"
2023-04-23 10:55:18 +00:00
type privateType struct {
x int
}
func NewPrivateType(x int) any {
return privateType{x}
}
2021-04-14 15:41:01 +00:00
type Struct struct {
a int
b string
2023-04-23 10:55:18 +00:00
p privateType
2021-04-14 15:41:01 +00:00
}
func (s *Struct) String() string {
2023-04-23 10:55:18 +00:00
return fmt.Sprintf("%d %s %d", s.a, s.b, s.p.x)
2021-04-14 15:41:01 +00:00
}