blob: 8a44ea995973f8c6552242701dd74660d3d801da [file] [log] [blame]
Matthias Andreas Benkard832a54e2019-01-29 09:27:38 +01001/*
2Copyright 2015 The Kubernetes Authors.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17// Package namer has support for making different type naming systems.
18//
19// This is because sometimes you want to refer to the literal type, sometimes
20// you want to make a name for the thing you're generating, and you want to
21// make the name based on the type. For example, if you have `type foo string`,
22// you want to be able to generate something like `func FooPrinter(f *foo) {
23// Print(string(*f)) }`; that is, you want to refer to a public name, a literal
24// name, and the underlying literal name.
25//
26// This package supports the idea of a "Namer" and a set of "NameSystems" to
27// support these use cases.
28//
29// Additionally, a "RawNamer" can optionally keep track of what needs to be
30// imported.
31package namer // import "k8s.io/gengo/namer"