utils

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCmdServiceImportPath

func GetCmdServiceImportPath(name string) (string, error)

GetCmdServiceImportPath returns the import path of the cmd service (used by cmd/main.go).

func GetDockerFileProjectPath

func GetDockerFileProjectPath() (string, error)

GetDockerFileProjectPath returns the path of the project.

func GetEndpointImportPath

func GetEndpointImportPath(name string) (string, error)

GetEndpointImportPath returns the import path of the service endpoints.

func GetGOPATH

func GetGOPATH() string

GetGOPATH returns the gopath.

func GetGRPCTransportImportPath

func GetGRPCTransportImportPath(name string) (string, error)

GetGRPCTransportImportPath returns the import path of the service grpc transport.

func GetHTTPTransportImportPath

func GetHTTPTransportImportPath(name string) (string, error)

GetHTTPTransportImportPath returns the import path of the service http transport.

func GetPbImportPath

func GetPbImportPath(name, pathByFlag string) (string, error)

GetPbImportPath returns the import path of the generated service grpc pb.

func GetServiceImportPath

func GetServiceImportPath(name string) (string, error)

GetServiceImportPath returns the import path of the service interface.

func GoImportsSource

func GoImportsSource(path string, s string) (string, error)

GoImportsSource is used to format and optimize imports the given source.

func IsExist

func IsExist(path string) bool

func ToCamelCase

func ToCamelCase(s string) string

ToCamelCase the given string in camelcase format.

func ToLowerFirstCamelCase

func ToLowerFirstCamelCase(s string) string

ToLowerFirstCamelCase returns the given string in camelcase formatted string but with the first letter being lowercase.

func ToLowerSnakeCase

func ToLowerSnakeCase(s string) string

ToLowerSnakeCase the given string in snake-case format.

func ToUpperFirst

func ToUpperFirst(s string) string

ToUpperFirst returns the given string with the first letter being uppercase.

Types

This section is empty.

Jump to

Keyboard shortcuts

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