File: a.go

package info (click to toggle)
golang-github-kubernetes-gengo 0.0~git20170531.0.c79c13d-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 868 kB
  • ctags: 804
  • sloc: makefile: 22
file content (130 lines) | stat: -rw-r--r-- 3,589 bytes parent folder | download
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
/*
Copyright 2016 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package wholepkg

// Trivial
type Struct_Empty struct{}

// Only primitives
type Struct_Primitives struct {
	BoolField   bool
	IntField    int
	StringField string
	FloatField  float64
}
type Struct_Primitives_Alias Struct_Primitives
type Struct_Embed_Struct_Primitives struct {
	Struct_Primitives
}
type Struct_Embed_Int struct {
	int
}
type Struct_Struct_Primitives struct {
	StructField Struct_Primitives
}

// Manual DeepCopy method
type ManualStruct struct {
	StringField string
}

func (m ManualStruct) DeepCopy() ManualStruct {
	return m
}

type ManualStruct_Alias ManualStruct

type Struct_Embed_ManualStruct struct {
	ManualStruct
}

// Only pointers to primitives
type Struct_PrimitivePointers struct {
	BoolPtrField   *bool
	IntPtrField    *int
	StringPtrField *string
	FloatPtrField  *float64
}
type Struct_PrimitivePointers_Alias Struct_PrimitivePointers
type Struct_Embed_Struct_PrimitivePointers struct {
	Struct_PrimitivePointers
}
type Struct_Embed_Pointer struct {
	*int
}
type Struct_Struct_PrimitivePointers struct {
	StructField Struct_PrimitivePointers
}

// Manual DeepCopy method
type ManualSlice []string

func (m ManualSlice) DeepCopy() ManualSlice {
	r := make(ManualSlice, len(m))
	copy(r, m)
	return r
}

// Slices
type Struct_Slices struct {
	SliceBoolField                         []bool
	SliceByteField                         []byte
	SliceIntField                          []int
	SliceStringField                       []string
	SliceFloatField                        []float64
	SliceStructPrimitivesField             []Struct_Primitives
	SliceStructPrimitivesAliasField        []Struct_Primitives_Alias
	SliceStructPrimitivePointersField      []Struct_PrimitivePointers
	SliceStructPrimitivePointersAliasField []Struct_PrimitivePointers_Alias
	SliceSliceIntField                     [][]int
	SliceManualStructField                 []ManualStruct
	ManualSliceField                       ManualSlice
}
type Struct_Slices_Alias Struct_Slices
type Struct_Embed_Struct_Slices struct {
	Struct_Slices
}
type Struct_Struct_Slices struct {
	StructField Struct_Slices
}

// Everything
type Struct_Everything struct {
	BoolField                 bool
	IntField                  int
	StringField               string
	FloatField                float64
	StructField               Struct_Primitives
	EmptyStructField          Struct_Empty
	ManualStructField         ManualStruct
	ManualStructAliasField    ManualStruct_Alias
	BoolPtrField              *bool
	IntPtrField               *int
	StringPtrField            *string
	FloatPtrField             *float64
	PrimitivePointersField    Struct_PrimitivePointers
	ManualStructPtrField      *ManualStruct
	ManualStructAliasPtrField *ManualStruct_Alias
	SliceBoolField            []bool
	SliceByteField            []byte
	SliceIntField             []int
	SliceStringField          []string
	SliceFloatField           []float64
	SlicesField               Struct_Slices
	SliceManualStructField    []ManualStruct
	ManualSliceField          ManualSlice
}