Documentation
¶
Index ¶
- func Copy(src, dest string) error
- func EnsureDirectoryExists(path string) error
- func GenRandInt(min, max int) int
- func InSlice(s string, ss []string) bool
- func IsDirectoryExists(path string) bool
- func IsFileExists(path string) bool
- func KeyFunc(key interface{}) (int64, int64, error)
- func Move(src, dest string) error
- func NewHttpClient(timeout time.Duration, url string) *httpClient
- func ReadFromFile(fileName string) ([]byte, error)
- func RemoveFile(filePath string)
- func RunCmd(exec exec.Interface, cmd []string) ([]byte, error)
- func ToRegexp(pattern string) string
- func TrimAndFilter(input []string) []string
- func WriteIntoFile(content string, fileName string) error
- type Git
- type HttpInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureDirectoryExists ¶
func GenRandInt ¶
func IsDirectoryExists ¶
func IsFileExists ¶
func NewHttpClient ¶
func ReadFromFile ¶
func RemoveFile ¶
func RemoveFile(filePath string)
func TrimAndFilter ¶
func WriteIntoFile ¶
Types ¶
type Git ¶
type Git struct {
RepoDir string
Branch string
Title string
// contains filtered or unexported fields
}
Git 封装 git 命令行,以避免依赖,golang 的 git 库需要按照 c 库
func (*Git) CurrentBranch ¶
func (*Git) LocalBranches ¶
Click to show internal directories.
Click to hide internal directories.