github.com/rancher/types@v0.0.0-20220328215343-4370ff10ecd5/README.md (about) 1 ### Note: This repository is deprecated. It was migrated to [Rancher/Rancher](https://github.com/rancher/rancher). No new issues or PRs should be opened here. 2 3 Rancher API Types 4 ======== 5 6 API Types for Rancher 2.0 7 8 ## Building 9 10 `make` 11 12 ## Running the code generator 13 14 Run `go generate` in the root of the project 15 16 ### Running code generation after go modules 17 18 The code generation code still depends on the GOPATH. 19 To generate types you need to update vendor. 20 21 1. Ensure your types project is where your current PWD is set up like a gopath. 22 23 `<dir>/src/github.com/rancher/types` 24 25 Example: 26 `/Users/<yourusername>/work/types/src/github.com/rancher/types` or 27 `/Users/<yourusername>/go/src/github.com/rancher/types` 28 2. Update go.mod for what you need 29 3. Run `GO111MODULE=on go mod vendor` 30 4. Export your types gopath directory 31 32 `export GOPATH=<dir>` 33 34 Example: 35 `export GOPATH=/Users/<yourusername>/work/types` or 36 `export GOPATH=/Users/<yourusername>/go` 37 5. Run `GO111MODULE=off go generate` 38 6. Run `unset GOPATH` 39 40 41 ## License 42 Copyright (c) 2014-2017 [Rancher Labs, Inc.](http://rancher.com) 43 44 Licensed under the Apache License, Version 2.0 (the "License"); 45 you may not use this file except in compliance with the License. 46 You may obtain a copy of the License at 47 48 [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) 49 50 Unless required by applicable law or agreed to in writing, software 51 distributed under the License is distributed on an "AS IS" BASIS, 52 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 53 See the License for the specific language governing permissions and 54 limitations under the License.