Documentation
¶
Index ¶
- Constants
- func CheckConfigFileExist(root, f string) bool
- func CheckFileExist(filename string) bool
- func Dir(pathfile string) string
- func FileNameOfPath(pathfile string) string
- func FindAllDirs(dirPath string) ([]string, error)
- func FindDirs(rootdir string) ([]string, error)
- func FindRootDir() string
- func FindRootDirGoMod() string
- func FindRootPkg() string
- func GetCurPath() string
- func GetPkg(pkgPath string) (*build.Package, error)
- func GetPkgAllFilesPath(pkgPath string) ([]string, error)
- func GetPkgPath(pkgPath string) (string, error)
- func IfLinux() bool
- func IfWindows() bool
- func ImportPkg(pkgpath string) (*build.Package, error)
- func ImportPkgDir(pkgpath string) (string, error)
- func LoadGofileUtil() baseiface.ISingleton
- func ReadFileToString(file string) (string, error)
- func ReadSubDirs(rootPath string) ([]string, error)
- func SetRootPkgEnv(p string)
- func TryFileExist(filename string) bool
- func UnZip(zipFile string, destPath string) error
- func WriteBytesFile(filename string, bytes []byte) error
- func Zip(srcPath string, destFile string) error
- type FindFileService
- func (self *FindFileService) Dir() string
- func (self *FindFileService) ExcludeSuffix() string
- func (self *FindFileService) FindFiles() ([]string, error)
- func (self *FindFileService) IncludeSuffix() string
- func (self *FindFileService) SetDir(dir string)
- func (self *FindFileService) SetExcludeSuffix(excludeSuffix string)
- func (self *FindFileService) SetIncludeSuffix(includeSuffix string)
- type GofileUtil
- func (this *GofileUtil) CheckConfigFileExist(root, f string) bool
- func (this *GofileUtil) CheckFileExist(filename string) bool
- func (this *GofileUtil) Dir(pathfile string) string
- func (this *GofileUtil) FindPkgPath(pkg string) string
- func (this *GofileUtil) FindRootDir() string
- func (this *GofileUtil) FindRootDirGoMod() string
- func (this *GofileUtil) FindRootDirPrev() string
- func (this *GofileUtil) FindRootPkg() string
- func (this *GofileUtil) GetCurPath() string
- func (this *GofileUtil) SetRootPkgEnv(p string)
- func (this *GofileUtil) TryFileExist(filename string) bool
- func (this *GofileUtil) UnZip(zipFile string, destPath string) error
- func (this *GofileUtil) Zip(srcPath string, destFile string) error
Constants ¶
View Source
const FILE_GOMOD = "go.mod"
Variables ¶
This section is empty.
Functions ¶
func CheckConfigFileExist ¶
func CheckFileExist ¶
func FileNameOfPath ¶
func FindAllDirs ¶
func FindRootDir ¶
func FindRootDir() string
func FindRootDirGoMod ¶
func FindRootDirGoMod() string
func FindRootPkg ¶
func FindRootPkg() string
func GetCurPath ¶
func GetCurPath() string
func GetPkgAllFilesPath ¶
获取第三方包下所有文件的相对路径
func GetPkgPath ¶
func ImportPkgDir ¶
func LoadGofileUtil ¶
func LoadGofileUtil() baseiface.ISingleton
func ReadFileToString ¶
func ReadSubDirs ¶
func SetRootPkgEnv ¶
func SetRootPkgEnv(p string)
func TryFileExist ¶
func WriteBytesFile ¶
Types ¶
type FindFileService ¶
type FindFileService struct {
// contains filtered or unexported fields
}
func NewFindFileService ¶
func NewFindFileService() *FindFileService
func (*FindFileService) Dir ¶
func (self *FindFileService) Dir() string
func (*FindFileService) ExcludeSuffix ¶
func (self *FindFileService) ExcludeSuffix() string
func (*FindFileService) FindFiles ¶
func (self *FindFileService) FindFiles() ([]string, error)
func (*FindFileService) IncludeSuffix ¶
func (self *FindFileService) IncludeSuffix() string
func (*FindFileService) SetDir ¶
func (self *FindFileService) SetDir(dir string)
func (*FindFileService) SetExcludeSuffix ¶
func (self *FindFileService) SetExcludeSuffix(excludeSuffix string)
func (*FindFileService) SetIncludeSuffix ¶
func (self *FindFileService) SetIncludeSuffix(includeSuffix string)
type GofileUtil ¶
type GofileUtil struct {
basedto.BaseEntitySingle
}
func FindBeanGofileUtil ¶
func FindBeanGofileUtil() *GofileUtil
func NewGofileUtil ¶
func NewGofileUtil() *GofileUtil
func (*GofileUtil) CheckConfigFileExist ¶
func (this *GofileUtil) CheckConfigFileExist(root, f string) bool
func (*GofileUtil) CheckFileExist ¶
func (this *GofileUtil) CheckFileExist(filename string) bool
func (*GofileUtil) Dir ¶
func (this *GofileUtil) Dir(pathfile string) string
func (*GofileUtil) FindPkgPath ¶
func (this *GofileUtil) FindPkgPath(pkg string) string
func (*GofileUtil) FindRootDir ¶
func (this *GofileUtil) FindRootDir() string
func (*GofileUtil) FindRootDirGoMod ¶
func (this *GofileUtil) FindRootDirGoMod() string
func (*GofileUtil) FindRootDirPrev ¶
func (this *GofileUtil) FindRootDirPrev() string
func (*GofileUtil) FindRootPkg ¶
func (this *GofileUtil) FindRootPkg() string
func (*GofileUtil) GetCurPath ¶
func (this *GofileUtil) GetCurPath() string
func (*GofileUtil) SetRootPkgEnv ¶
func (this *GofileUtil) SetRootPkgEnv(p string)
func (*GofileUtil) TryFileExist ¶
func (this *GofileUtil) TryFileExist(filename string) bool
Source Files
¶
Click to show internal directories.
Click to hide internal directories.