openshift-evangelists / crd-code-generation Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
In this code, openshift-evangelist
should be openshift-evangelists
.
When I run: go build
I get:
./main.go:28:56: cannot use cfg (type *"src/github.com/openshift-evangelists/crd-code-generation/vendor/k8s.io/client-go/rest".Config) as type *"github.com/openshift-evangelists/crd-code-generation/vendor/k8s.io/client-go/rest".Config in argument to versioned.NewForConfig
./main.go:33:85: cannot use "src/github.com/openshift-evangelists/crd-code-generation/vendor/k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions literal (type "src/github.com/openshift-evangelists/crd-code-generation/vendor/k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions) as type "github.com/openshift-evangelists/crd-code-generation/vendor/k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions in argument to exampleClient.ExampleV1().Databases("default").List
Downloaded the example code and tried running the update-codegen.sh (no was code modified):
$ ./hack/update-codegen.sh
code generators are in ./vendor/k8s.io/code-generator
Generating deepcopy funcs
Generating clientset for example.com:v1 at github.com/openshift-evangelists/crd-code-generation/pkg/client/clientset
ERROR: logging before flag.Parse: F0207 14:12:51.419209 13332 main.go:202] Error: Failed executing generator: some packages had errors:
errors in package "github.com\openshift-evangelists\crd-code-generation\pkg\client\clientset\versioned":
unable to format file "c:\users\dettwil\go\src\github.com\openshift-evangelists\crd-code-generation\pkg\client\clientset\versioned\clientset.go" (19:8: expected 'STRING', found '/' (and 10 more errors)).
errors in package "github.com\openshift-evangelists\crd-code-generation\pkg\client\clientset\versioned\scheme":
unable to format file "c:\users\dettwil\go\src\github.com\openshift-evangelists\crd-code-generation\pkg\client\clientset\versioned\scheme\register.go" (19:8: expected 'STRING', found '/' (and 8 more errors)).
errors in package "github.com\openshift-evangelists\crd-code-generation\pkg\client\clientset\versioned\fake":
unable to format file "c:\users\dettwil\go\src\github.com\openshift-evangelists\crd-code-generation\pkg\client\clientset\versioned\fake\clientset_generated.go" (22:9: expected 'STRING', found '.' (and 17 more errors)).
unable to format file "c:\users\dettwil\go\src\github.com\openshift-evangelists\crd-code-generation\pkg\client\clientset\versioned\fake\register.go" (19:8: expected 'STRING', found '/' (and 8 more errors)).
errors in package "github.com\openshift-evangelists\crd-code-generation\pkg\client\clientset\versioned\typed\example.com\v1":
unable to format file "c:\users\dettwil\go\src\github.com\openshift-evangelists\crd-code-generation\pkg\client\clientset\versioned\typed\example.com\v1\database.go" (19:17: unknown escape sequence (and 10 more errors)).
unable to format file "c:\users\dettwil\go\src\github.com\openshift-evangelists\crd-code-generation\pkg\client\clientset\versioned\typed\example.com\v1\example.com_client.go" (19:17: unknown escape sequence (and 10 more errors)).
errors in package "github.com\openshift-evangelists\crd-code-generation\pkg\client\clientset\versioned\typed\example.com\v1\fake":
unable to format file "c:\users\dettwil\go\src\github.com\openshift-evangelists\crd-code-generation\pkg\client\clientset\versioned\typed\example.com\v1\fake\fake_database.go" (19:8: expected 'STRING', found '/' (and 10 more errors)).
unable to format file "c:\users\dettwil\go\src\github.com\openshift-evangelists\crd-code-generation\pkg\client\clientset\versioned\typed\example.com\v1\fake\fake_example.com_client.go" (19:8: expected 'STRING', found '/' (and 10 more errors)).
goroutine 1 [running]:
crd-code-generation/vendor/github.com/golang/glog.stacks(0xc042004000, 0xc043a24400, 0xa34, 0xa89)
c:/users/dettwil/go/src/crd-code-generation/vendor/github.com/golang/glog/glog.go:769 +0xd6
crd-code-generation/vendor/github.com/golang/glog.(*loggingT).output(0x8a1c40, 0xc000000003, 0xc0475da630, 0x87c9dc, 0x7, 0xca, 0x0)
c:/users/dettwil/go/src/crd-code-generation/vendor/github.com/golang/glog/glog.go:720 +0x33d
crd-code-generation/vendor/github.com/golang/glog.(*loggingT).printf(0x8a1c40, 0x3, 0x71695a, 0x9, 0xc04a02fe28, 0x1, 0x1)
c:/users/dettwil/go/src/crd-code-generation/vendor/github.com/golang/glog/glog.go:655 +0x153
crd-code-generation/vendor/github.com/golang/glog.Fatalf(0x71695a, 0x9, 0xc04a02fe28, 0x1, 0x1)
c:/users/dettwil/go/src/crd-code-generation/vendor/github.com/golang/glog/glog.go:1148 +0x6e
main.main()
c:/users/dettwil/go/src/crd-code-generation/vendor/k8s.io/code-generator/cmd/client-gen/main.go:202 +0x6be
Looking at the generated code- the imports are being created as follows:
import (
github_com/golang/glog "github.com/golang/glog"
k8s_io/client_go/discovery "k8s.io/client-go/discovery"
k8s_io/client_go/rest "k8s.io/client-go/rest"
k8s_io/client_go/util/flowcontrol "k8s.io/client-go/util/flowcontrol"
example.comv1 "github.com\openshift-evangelists\crd-code-generation\pkg\client\clientset\versioned\typed\example.com\v1"
)
Using go 1.9.1 on cygwin (Windows). Any ideas?
I run
$ ./example -kubeconfig ~/.kube/config
and I get
F0510 12:14:20.618026 25427 main.go:30] Error building example clientset: No Auth Provider found for name "gcp"
goroutine 1 [running]:
github.com/openshift-evangelists/crd-code-generation/vendor/github.com/golang/glog.stacks(0xc4203d4e00, 0xc420218000, 0x72, 0xc7)
/Users/acabrera/go/src/github.com/openshift-evangelists/crd-code-generation/vendor/github.com/golang/glog/glog.go:769 +0xcf
github.com/openshift-evangelists/crd-code-generation/vendor/github.com/golang/glog.(*loggingT).output(0x21da2c0, 0xc400000003, 0xc4200ee630, 0x216c8b4, 0x7, 0x1e, 0x0)
/Users/acabrera/go/src/github.com/openshift-evangelists/crd-code-generation/vendor/github.com/golang/glog/glog.go:720 +0x32d
github.com/openshift-evangelists/crd-code-generation/vendor/github.com/golang/glog.(*loggingT).printf(0x21da2c0, 0x3, 0x1aff178, 0x24, 0xc420487cd8, 0x1, 0x1)
/Users/acabrera/go/src/github.com/openshift-evangelists/crd-code-generation/vendor/github.com/golang/glog/glog.go:655 +0x14b
github.com/openshift-evangelists/crd-code-generation/vendor/github.com/golang/glog.Fatalf(0x1aff178, 0x24, 0xc420487cd8, 0x1, 0x1)
/Users/acabrera/go/src/github.com/openshift-evangelists/crd-code-generation/vendor/github.com/golang/glog/glog.go:1148 +0x67
main.main()
/Users/acabrera/go/src/github.com/openshift-evangelists/crd-code-generation/cmd/example/main.go:30 +0x166
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.