Add generated file
This PR adds generated files under pkg/client and vendor folder.
This commit is contained in:
32
vendor/golang.org/x/tools/cmd/stringer/testdata/cgo.go
generated
vendored
Normal file
32
vendor/golang.org/x/tools/cmd/stringer/testdata/cgo.go
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Import "C" shouldn't be imported.
|
||||
|
||||
package main
|
||||
|
||||
/*
|
||||
#define HELLO 1
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import "fmt"
|
||||
|
||||
type Cgo uint32
|
||||
|
||||
const (
|
||||
// MustScanSubDirs indicates that events were coalesced hierarchically.
|
||||
MustScanSubDirs Cgo = 1 << iota
|
||||
)
|
||||
|
||||
func main() {
|
||||
_ = C.HELLO
|
||||
ck(MustScanSubDirs, "MustScanSubDirs")
|
||||
}
|
||||
|
||||
func ck(day Cgo, str string) {
|
||||
if fmt.Sprint(day) != str {
|
||||
panic("cgo.go: " + str)
|
||||
}
|
||||
}
|
39
vendor/golang.org/x/tools/cmd/stringer/testdata/day.go
generated
vendored
Normal file
39
vendor/golang.org/x/tools/cmd/stringer/testdata/day.go
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Simple test: enumeration of type int starting at 0.
|
||||
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
type Day int
|
||||
|
||||
const (
|
||||
Monday Day = iota
|
||||
Tuesday
|
||||
Wednesday
|
||||
Thursday
|
||||
Friday
|
||||
Saturday
|
||||
Sunday
|
||||
)
|
||||
|
||||
func main() {
|
||||
ck(Monday, "Monday")
|
||||
ck(Tuesday, "Tuesday")
|
||||
ck(Wednesday, "Wednesday")
|
||||
ck(Thursday, "Thursday")
|
||||
ck(Friday, "Friday")
|
||||
ck(Saturday, "Saturday")
|
||||
ck(Sunday, "Sunday")
|
||||
ck(-127, "Day(-127)")
|
||||
ck(127, "Day(127)")
|
||||
}
|
||||
|
||||
func ck(day Day, str string) {
|
||||
if fmt.Sprint(day) != str {
|
||||
panic("day.go: " + str)
|
||||
}
|
||||
}
|
44
vendor/golang.org/x/tools/cmd/stringer/testdata/gap.go
generated
vendored
Normal file
44
vendor/golang.org/x/tools/cmd/stringer/testdata/gap.go
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Gaps and an offset.
|
||||
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
type Gap int
|
||||
|
||||
const (
|
||||
Two Gap = 2
|
||||
Three Gap = 3
|
||||
Five Gap = 5
|
||||
Six Gap = 6
|
||||
Seven Gap = 7
|
||||
Eight Gap = 8
|
||||
Nine Gap = 9
|
||||
Eleven Gap = 11
|
||||
)
|
||||
|
||||
func main() {
|
||||
ck(0, "Gap(0)")
|
||||
ck(1, "Gap(1)")
|
||||
ck(Two, "Two")
|
||||
ck(Three, "Three")
|
||||
ck(4, "Gap(4)")
|
||||
ck(Five, "Five")
|
||||
ck(Six, "Six")
|
||||
ck(Seven, "Seven")
|
||||
ck(Eight, "Eight")
|
||||
ck(Nine, "Nine")
|
||||
ck(10, "Gap(10)")
|
||||
ck(Eleven, "Eleven")
|
||||
ck(12, "Gap(12)")
|
||||
}
|
||||
|
||||
func ck(gap Gap, str string) {
|
||||
if fmt.Sprint(gap) != str {
|
||||
panic("gap.go: " + str)
|
||||
}
|
||||
}
|
35
vendor/golang.org/x/tools/cmd/stringer/testdata/num.go
generated
vendored
Normal file
35
vendor/golang.org/x/tools/cmd/stringer/testdata/num.go
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Signed integers spanning zero.
|
||||
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
type Num int
|
||||
|
||||
const (
|
||||
m_2 Num = -2 + iota
|
||||
m_1
|
||||
m0
|
||||
m1
|
||||
m2
|
||||
)
|
||||
|
||||
func main() {
|
||||
ck(-3, "Num(-3)")
|
||||
ck(m_2, "m_2")
|
||||
ck(m_1, "m_1")
|
||||
ck(m0, "m0")
|
||||
ck(m1, "m1")
|
||||
ck(m2, "m2")
|
||||
ck(3, "Num(3)")
|
||||
}
|
||||
|
||||
func ck(num Num, str string) {
|
||||
if fmt.Sprint(num) != str {
|
||||
panic("num.go: " + str)
|
||||
}
|
||||
}
|
34
vendor/golang.org/x/tools/cmd/stringer/testdata/number.go
generated
vendored
Normal file
34
vendor/golang.org/x/tools/cmd/stringer/testdata/number.go
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Enumeration with an offset.
|
||||
// Also includes a duplicate.
|
||||
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
type Number int
|
||||
|
||||
const (
|
||||
_ Number = iota
|
||||
One
|
||||
Two
|
||||
Three
|
||||
AnotherOne = One // Duplicate; note that AnotherOne doesn't appear below.
|
||||
)
|
||||
|
||||
func main() {
|
||||
ck(One, "One")
|
||||
ck(Two, "Two")
|
||||
ck(Three, "Three")
|
||||
ck(AnotherOne, "One")
|
||||
ck(127, "Number(127)")
|
||||
}
|
||||
|
||||
func ck(num Number, str string) {
|
||||
if fmt.Sprint(num) != str {
|
||||
panic("number.go: " + str)
|
||||
}
|
||||
}
|
56
vendor/golang.org/x/tools/cmd/stringer/testdata/prime.go
generated
vendored
Normal file
56
vendor/golang.org/x/tools/cmd/stringer/testdata/prime.go
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Enough gaps to trigger a map implementation of the method.
|
||||
// Also includes a duplicate to test that it doesn't cause problems
|
||||
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
type Prime int
|
||||
|
||||
const (
|
||||
p2 Prime = 2
|
||||
p3 Prime = 3
|
||||
p5 Prime = 5
|
||||
p7 Prime = 7
|
||||
p77 Prime = 7 // Duplicate; note that p77 doesn't appear below.
|
||||
p11 Prime = 11
|
||||
p13 Prime = 13
|
||||
p17 Prime = 17
|
||||
p19 Prime = 19
|
||||
p23 Prime = 23
|
||||
p29 Prime = 29
|
||||
p37 Prime = 31
|
||||
p41 Prime = 41
|
||||
p43 Prime = 43
|
||||
)
|
||||
|
||||
func main() {
|
||||
ck(0, "Prime(0)")
|
||||
ck(1, "Prime(1)")
|
||||
ck(p2, "p2")
|
||||
ck(p3, "p3")
|
||||
ck(4, "Prime(4)")
|
||||
ck(p5, "p5")
|
||||
ck(p7, "p7")
|
||||
ck(p77, "p7")
|
||||
ck(p11, "p11")
|
||||
ck(p13, "p13")
|
||||
ck(p17, "p17")
|
||||
ck(p19, "p19")
|
||||
ck(p23, "p23")
|
||||
ck(p29, "p29")
|
||||
ck(p37, "p37")
|
||||
ck(p41, "p41")
|
||||
ck(p43, "p43")
|
||||
ck(44, "Prime(44)")
|
||||
}
|
||||
|
||||
func ck(prime Prime, str string) {
|
||||
if fmt.Sprint(prime) != str {
|
||||
panic("prime.go: " + str)
|
||||
}
|
||||
}
|
11
vendor/golang.org/x/tools/cmd/stringer/testdata/tag_main.go
generated
vendored
Normal file
11
vendor/golang.org/x/tools/cmd/stringer/testdata/tag_main.go
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
// No build tag in this file.
|
||||
|
||||
package main
|
||||
|
||||
type Const int
|
||||
|
||||
const (
|
||||
A Const = iota
|
||||
B
|
||||
C
|
||||
)
|
7
vendor/golang.org/x/tools/cmd/stringer/testdata/tag_tag.go
generated
vendored
Normal file
7
vendor/golang.org/x/tools/cmd/stringer/testdata/tag_tag.go
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// This file has a build tag "tag"
|
||||
|
||||
// +build tag
|
||||
|
||||
package main
|
||||
|
||||
const TagProtected Const = C + 1
|
38
vendor/golang.org/x/tools/cmd/stringer/testdata/unum.go
generated
vendored
Normal file
38
vendor/golang.org/x/tools/cmd/stringer/testdata/unum.go
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Unsigned integers spanning zero.
|
||||
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
type Unum uint8
|
||||
|
||||
const (
|
||||
m_2 Unum = iota + 253
|
||||
m_1
|
||||
)
|
||||
|
||||
const (
|
||||
m0 Unum = iota
|
||||
m1
|
||||
m2
|
||||
)
|
||||
|
||||
func main() {
|
||||
ck(^Unum(0)-3, "Unum(252)")
|
||||
ck(m_2, "m_2")
|
||||
ck(m_1, "m_1")
|
||||
ck(m0, "m0")
|
||||
ck(m1, "m1")
|
||||
ck(m2, "m2")
|
||||
ck(3, "Unum(3)")
|
||||
}
|
||||
|
||||
func ck(unum Unum, str string) {
|
||||
if fmt.Sprint(unum) != str {
|
||||
panic("unum.go: " + str)
|
||||
}
|
||||
}
|
31
vendor/golang.org/x/tools/cmd/stringer/testdata/unum2.go
generated
vendored
Normal file
31
vendor/golang.org/x/tools/cmd/stringer/testdata/unum2.go
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Unsigned integers - check maximum size
|
||||
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
type Unum2 uint8
|
||||
|
||||
const (
|
||||
Zero Unum2 = iota
|
||||
One
|
||||
Two
|
||||
)
|
||||
|
||||
func main() {
|
||||
ck(Zero, "Zero")
|
||||
ck(One, "One")
|
||||
ck(Two, "Two")
|
||||
ck(3, "Unum2(3)")
|
||||
ck(255, "Unum2(255)")
|
||||
}
|
||||
|
||||
func ck(unum Unum2, str string) {
|
||||
if fmt.Sprint(unum) != str {
|
||||
panic("unum.go: " + str)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user