-
Notifications
You must be signed in to change notification settings - Fork 20
/
example.go
35 lines (25 loc) · 859 Bytes
/
example.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright (c) 2016 Paul Jolly <paul@myitcv.org.uk>, all rights reserved.
// Use of this document is governed by a license found in the LICENSE document.
package example
// The following directive will result in a generated file that includes the
// directive //go:generate echo "hello world"
//
//go:generate gobin -m -run myitcv.io/immutable/cmd/immutableGen -licenseFile license_header.txt -G "echo \"hello world\""
// MyMap will be exported
type _Imm_MyMap map[string]*MySlice
// MySlice will be exported
type _Imm_MySlice []*MyMap
// Where is this
// MyStruct will be exported.
//
// It is a special type.
type _Imm_MyStruct struct {
// This is a non-field comment
// Name is a field in MyStruct
Name string `tag:"value"`
// surname will not be exported
surname string
self *MyStruct
// age will not be exported
age int `tag:"age"`
}