Documentation ¶
Overview ¶
Package fitstringer is a fork of golang.org/x/tools/cmd/stringer used to generate string methods for the FIT types generated by cmd/fitgen. It is now a library instead of a command. It also has slightly different logic for prefix trimming compared to the original. This version will always remove the type name prefix for each generated type.
golang.org/x/tools commit used as base: https://github.com/golang/tools/commit/63e6ed9258fa6cbc90aab9b1eef3e0866e89b874
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
Generate generates string methods using the logic from the official stringer tool, but does not write the output to a file, and instead returns the output source code as bytes. It takes a given set of type name and their source definitions as input. Each type will also have its name prefix removed from the resulting string methods.
Types ¶
This section is empty.