Help us shape the future of Go! Take the 2026 Go Developer Survey

util

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddName

func AddName(prefix, suffix string) string

AddName creates a snake case name from prefix and suffix

func CollectData

func CollectData(name string, data []string) string

CollectData creates string representing go file

func Const

func Const(data []string) string

func Indent

func Indent(width int) string

Indent returns an indent with given width

func IndexVariable

func IndexVariable(depth int) rune

IndexVariable returns a name of variable used in for loop

func ParseType

func ParseType(itemType interface{}) (string, bool, error)

ParseType converts an interface to a name of a go type

func ResultPrefix

func ResultPrefix(argument string, depth int, create bool) string

ResultPrefix returns a prefix for getter function

func ToGoName

func ToGoName(prefix, suffix string) string

ToGoName creates a camel case name from prefix and suffix

func TryToAddName

func TryToAddName(prefix, suffix string) string

TryToAddName creates a snake case name from prefix and suffix if prefix is empty empty string is returned

func VariableName

func VariableName(name string) string

VariableName gets a variable name from its type

Types

This section is empty.

Source Files

  • package.go
  • type.go
  • variable.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL