Documentation ¶
Index ¶
- Constants
- Variables
- func Clean(category string) error
- func Copy(src, dest string) error
- func CreateTemplate(category, name, content string) error
- func FileExists(file string) bool
- func GetCacheDir() (string, error)
- func GetDefaultXmdHome() (string, error)
- func GetTemplateDir(category string) (string, error)
- func GetXmdHome() (home string, err error)
- func InitTemplates(category string, templates map[string]string) error
- func LoadTemplate(category, file, builtin string) (string, error)
- func LookPath(xBin string) (string, error)
- func LookUpProtoc() (string, error)
- func LookUpProtocGenGo() (string, error)
- func LookUpProtocGenGoGrpc() (string, error)
- func MkdirIfNotExist(dir string) error
- func ReadLink(name string) (string, error)
Constants ¶
const ( NL = "\n" XmdDir = ".Xmd" )
NL defines a new line.
Variables ¶
var XmdHome string
Functions ¶
func CreateTemplate ¶
CreateTemplate writes template into file even it is exists.
func FileExists ¶
FileExists returns true if the specified file is exists.
func GetDefaultXmdHome ¶
GetDefaultXmdHome returns the path value of the Xmd home where Join $HOME with .Xmd.
func GetTemplateDir ¶
GetTemplateDir returns the category path value in XmdHome where could get it by GetXmdHome.
func GetXmdHome ¶
GetXmdHome returns the path value of the Xmd, the default path is ~/.Xmd, if the path has been set by calling the RegisterXmdHome method, the user-defined path refers to.
func InitTemplates ¶
InitTemplates creates template files XmdHome where could get it by GetXmdHome.
func LoadTemplate ¶
LoadTemplate gets template content by the specified file.
func LookPath ¶
LookPath searches for an executable named file in the directories named by the PATH environment variable, for the os windows, the named file will be spliced with the .exe suffix.
func LookUpProtoc ¶
LookUpProtoc searches an executable protoc in the directories named by the PATH environment variable.
func LookUpProtocGenGo ¶
LookUpProtocGenGo searches an executable protoc-gen-go in the directories named by the PATH environment variable.
func LookUpProtocGenGoGrpc ¶
LookUpProtocGenGoGrpc searches an executable protoc-gen-go-grpc in the directories named by the PATH environment variable.
func MkdirIfNotExist ¶
MkdirIfNotExist makes directories if the input path is not exists
Types ¶
This section is empty.