utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2020 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DictByNormalVariables

func DictByNormalVariables(fields []types.Variable, normals []types.Variable) Dict

func GetDefaultGoPath

func GetDefaultGoPath() (string, error)

func GetModulePath

func GetModulePath(goModPath string) string

func GetPkgPath

func GetPkgPath(fName string, isDir bool) (string, error)

func GetPkgPathFromGOPATH

func GetPkgPathFromGOPATH(fName string, isDir bool) (string, error)

func GetPkgPathFromGoMod

func GetPkgPathFromGoMod(fName string, isDir bool, goModPath string) (string, error)

func GetPkgPrefix

func GetPkgPrefix(base, pkg string) (prefix string)

func GetRelatedFilePath

func GetRelatedFilePath(pkg string) (string, error)

func GoModPath

func GoModPath(fName string, isDir bool) (string, error)

func Goimports

func Goimports(path string) (err error)

func PackageName

func PackageName(path string, decl string) (string, error)

func SliceStringToMap

func SliceStringToMap(slice []string) (m map[string]int)

convert slice of strings to map[string]int

func ToCamel

func ToCamel(s string) string

Converts a string to CamelCase

func ToLowerCamel

func ToLowerCamel(s string) string

Converts a string to lowerCamelCase

Types

This section is empty.

Jump to

Keyboard shortcuts

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