Code refactoring for bpa operator
[icn.git] / cmd / bpa-operator / vendor / k8s.io / gengo / generator / doc.go
1 /*
2 Copyright 2015 The Kubernetes Authors.
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8     http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15 */
16
17 // Package generator defines an interface for code generators to implement.
18 //
19 // To use this package, you'll implement the "Package" and "Generator"
20 // interfaces; you'll call NewContext to load up the types you want to work
21 // with, and then you'll call one or more of the Execute methods. See the
22 // interface definitions for explanations. All output will have gofmt called on
23 // it automatically, so you do not need to worry about generating correct
24 // indentation.
25 //
26 // This package also exposes SnippetWriter. SnippetWriter reduces to a minimum
27 // the boilerplate involved in setting up a template from go's text/template
28 // package. Additionally, all naming systems in the Context will be added as
29 // functions to the parsed template, so that they can be called directly from
30 // your templates!
31 package generator // import "k8s.io/gengo/generator"