doc.go 764 B

123456789101112131415
  1. // Package namer has support for making different type naming systems.
  2. //
  3. // This is because sometimes you want to refer to the literal type, sometimes
  4. // you want to make a name for the thing you're generating, and you want to
  5. // make the name based on the type. For example, if you have `type foo string`,
  6. // you want to be able to generate something like `func FooPrinter(f *foo) {
  7. // Print(string(*f)) }`; that is, you want to refer to a public name, a literal
  8. // name, and the underlying literal name.
  9. //
  10. // This package supports the idea of a "Namer" and a set of "NameSystems" to
  11. // support these use cases.
  12. //
  13. // Additionally, a "RawNamer" can optionally keep track of what needs to be
  14. // imported.
  15. package namer // import "go-common/app/tool/gengo/namer"