Documentation ¶
Index ¶
- func CreateFileAndFolders(filePath string) (*os.File, error)
- func FindFile(childDir, fileName string) (string, error)
- func GenerateOutputFileName(input, output string) string
- func GetPackagePath(goModPath string, modFile *modfile.File, filename string) (string, error)
- func GetRelativePath(path1, path2 string) (string, error)
- func ListGoFiles(dirs, ignore []string) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFileAndFolders ¶
CreateFileAndFolders creates a file and the necessary folders if they don't exist.
func FindFile ¶
FindFile searches for the specified file in the given directory and its parent directories.
func GenerateOutputFileName ¶
func GetPackagePath ¶
GetPackagePath returns the absolute path of the file package, including the module path. This function is not considering packages with different names from their respective folders, the reason is that this software is not made for psychopaths.
func GetRelativePath ¶ added in v0.3.1
GetRelativePath returns the shared path between two paths. if they are in the same folder, they will return the same folder path. Example: /path1/folder1/file and /path1/folder2/file2 should return /path1.
func ListGoFiles ¶
ListGoFiles lists all Go files under a directory.
Types ¶
This section is empty.