style fix

This commit is contained in:
Lai0n 2023-07-29 11:45:54 +02:00
parent 07e2d2fad7
commit 001dec7cc9
2 changed files with 0 additions and 13 deletions

View File

@ -3,7 +3,6 @@ package main
import "fmt" import "fmt"
// Arguments to format are: // Arguments to format are:
//
// [1]: type name // [1]: type name
const stringNameToValueMethod = `// %[1]sString retrieves an enum value from the enum constants string name. const stringNameToValueMethod = `// %[1]sString retrieves an enum value from the enum constants string name.
// Throws an error if the param is not part of the enum. // Throws an error if the param is not part of the enum.
@ -20,7 +19,6 @@ func %[1]sString(s string) (%[1]s, error) {
` `
// Arguments to format are: // Arguments to format are:
//
// [1]: type name // [1]: type name
const stringValuesMethod = `// %[1]sValues returns all values of the enum const stringValuesMethod = `// %[1]sValues returns all values of the enum
func %[1]sValues() []%[1]s { func %[1]sValues() []%[1]s {
@ -29,7 +27,6 @@ func %[1]sValues() []%[1]s {
` `
// Arguments to format are: // Arguments to format are:
//
// [1]: type name // [1]: type name
const stringsMethod = `// %[1]sStrings returns a slice of all String values of the enum const stringsMethod = `// %[1]sStrings returns a slice of all String values of the enum
func %[1]sStrings() []string { func %[1]sStrings() []string {
@ -40,7 +37,6 @@ func %[1]sStrings() []string {
` `
// Arguments to format are: // Arguments to format are:
//
// [1]: type name // [1]: type name
const stringBelongsMethodLoop = `// IsA%[1]s returns "true" if the value is listed in the enum definition. "false" otherwise const stringBelongsMethodLoop = `// IsA%[1]s returns "true" if the value is listed in the enum definition. "false" otherwise
func (i %[1]s) IsA%[1]s() bool { func (i %[1]s) IsA%[1]s() bool {
@ -54,7 +50,6 @@ func (i %[1]s) IsA%[1]s() bool {
` `
// Arguments to format are: // Arguments to format are:
//
// [1]: type name // [1]: type name
const stringBelongsMethodSet = `// IsA%[1]s returns "true" if the value is listed in the enum definition. "false" otherwise const stringBelongsMethodSet = `// IsA%[1]s returns "true" if the value is listed in the enum definition. "false" otherwise
func (i %[1]s) IsA%[1]s() bool { func (i %[1]s) IsA%[1]s() bool {
@ -64,7 +59,6 @@ func (i %[1]s) IsA%[1]s() bool {
` `
// Arguments to format are: // Arguments to format are:
//
// [1]: type name // [1]: type name
const altStringValuesMethod = `func (%[1]s) Values() []string { const altStringValuesMethod = `func (%[1]s) Values() []string {
return %[1]sStrings() return %[1]sStrings()
@ -150,7 +144,6 @@ func (g *Generator) printNamesSlice(runs [][]Value, typeName string, runsThresho
} }
// Arguments to format are: // Arguments to format are:
//
// [1]: type name // [1]: type name
const jsonMethods = ` const jsonMethods = `
// MarshalJSON implements the json.Marshaler interface for %[1]s // MarshalJSON implements the json.Marshaler interface for %[1]s
@ -176,7 +169,6 @@ func (g *Generator) buildJSONMethods(runs [][]Value, typeName string, runsThresh
} }
// Arguments to format are: // Arguments to format are:
//
// [1]: type name // [1]: type name
const textMethods = ` const textMethods = `
// MarshalText implements the encoding.TextMarshaler interface for %[1]s // MarshalText implements the encoding.TextMarshaler interface for %[1]s
@ -197,7 +189,6 @@ func (g *Generator) buildTextMethods(runs [][]Value, typeName string, runsThresh
} }
// Arguments to format are: // Arguments to format are:
//
// [1]: type name // [1]: type name
const yamlMethods = ` const yamlMethods = `
// MarshalYAML implements a YAML Marshaler for %[1]s // MarshalYAML implements a YAML Marshaler for %[1]s
@ -223,7 +214,6 @@ func (g *Generator) buildYAMLMethods(runs [][]Value, typeName string, runsThresh
} }
// Arguments to format are: // Arguments to format are:
//
// [1]: type name // [1]: type name
const xmlMethods = ` const xmlMethods = `
// MarshalXML implements a XML Marshaller for %[1]s // MarshalXML implements a XML Marshaller for %[1]s
@ -249,7 +239,6 @@ func (g *Generator) buildXMLMethods(runs [][]Value, typeName string, runsThresho
} }
// Arguments to format are: // Arguments to format are:
//
// [1]: type name // [1]: type name
const xmlAttrMethods = ` const xmlAttrMethods = `
// MarshalXMLAttr implements a XML Attribute Marshaller for %[1]s // MarshalXMLAttr implements a XML Attribute Marshaller for %[1]s

View File

@ -785,7 +785,6 @@ func (g *Generator) buildOneRun(runs [][]Value, typeName string) {
} }
// Arguments to format are: // Arguments to format are:
//
// [1]: type name // [1]: type name
// [2]: size of index element (8 for uint8 etc.) // [2]: size of index element (8 for uint8 etc.)
// [3]: less than zero check (for signed types) // [3]: less than zero check (for signed types)
@ -798,7 +797,6 @@ const stringOneRun = `func (i %[1]s) String() string {
` `
// Arguments to format are: // Arguments to format are:
//
// [1]: type name // [1]: type name
// [2]: lowest defined value for type, as a string // [2]: lowest defined value for type, as a string
// [3]: size of index element (8 for uint8 etc.) // [3]: size of index element (8 for uint8 etc.)