Documentation ¶
Overview ¶
19 types
Index ¶
- func AddContentToEachLineInFile(filePath string, predicate func(string) string) error
- func AddContentToFile(filePath, valueToAdd string, positon string) error
- func ArrayContainsAny(contentSlice, targetSlice []string) bool
- func CDToAngularApp()
- func CDToFirebaseApp()
- func CDToFlaskApp()
- func CDToFlutterApp()
- func CDToLocation(location string, opts ...interface{})
- func CDToTestNGApp()
- func CDToWorkspaceRoot()
- func ClearScreen()
- func CompileGlobs(patterns []string) []glob.Glob
- func ContainsAny(s string, substrs []string) bool
- func ConvertPathToOSFormat(inputPath string) string
- func ConvertToBoolArray(input []interface{}) []bool
- func ConvertToByteArray(input []interface{}) []byte
- func ConvertToComplex128Array(input []interface{}) []complex128
- func ConvertToComplex64Array(input []interface{}) []complex64
- func ConvertToFloat32Array(input []interface{}) []float32
- func ConvertToFloat64Array(input []interface{}) []float64
- func ConvertToInt16Array(input []interface{}) []int16
- func ConvertToInt32Array(input []interface{}) []int32
- func ConvertToInt64Array(input []interface{}) []int64
- func ConvertToInt8Array(input []interface{}) []int8
- func ConvertToIntArray(input []interface{}) []int
- func ConvertToInterfaceArray[T any](input []T) []interface{}
- func ConvertToRuneArray(input []interface{}) []rune
- func ConvertToStringArray(input []interface{}) []string
- func ConvertToStringBoolMap(originalMap map[string]interface{}) map[string]bool
- func ConvertToStringComplex128Map(originalMap map[string]interface{}) map[string]complex128
- func ConvertToStringComplex64Map(originalMap map[string]interface{}) map[string]complex64
- func ConvertToStringErrorMap(originalMap map[string]interface{}) map[string]error
- func ConvertToStringFloat32Map(originalMap map[string]interface{}) map[string]float32
- func ConvertToStringFloat64Map(originalMap map[string]interface{}) map[string]float64
- func ConvertToStringInt16Map(originalMap map[string]interface{}) map[string]int16
- func ConvertToStringInt32Map(originalMap map[string]interface{}) map[string]int32
- func ConvertToStringInt64Map(originalMap map[string]interface{}) map[string]int64
- func ConvertToStringInt8Map(originalMap map[string]interface{}) map[string]int8
- func ConvertToStringIntMap(originalMap map[string]interface{}) map[string]int
- func ConvertToStringInterfaceMap(originalMap map[string]interface{}) map[string]string
- func ConvertToStringStringMap(originalMap map[string]interface{}) map[string]string
- func ConvertToStringUint16Map(originalMap map[string]interface{}) map[string]uint16
- func ConvertToStringUint32Map(originalMap map[string]interface{}) map[string]uint32
- func ConvertToStringUint64Map(originalMap map[string]interface{}) map[string]uint64
- func ConvertToStringUint8Map(originalMap map[string]interface{}) map[string]uint8
- func ConvertToUint16Array(input []interface{}) []uint16
- func ConvertToUint32Array(input []interface{}) []uint32
- func ConvertToUint64Array(input []interface{}) []uint64
- func ConvertToUint8Array(input []interface{}) []uint8
- func ConvertToUintArray(input []interface{}) []uint
- func CopyDir(src, dest string) error
- func CopyFile(src, dest string) error
- func CopySelectFilesToDestination(c CopySelectFilesToDestinationStruct) error
- func DecreaseChannelBatchFn(i int, batchSize int, batchDone chan bool, targetArray []string)
- func DownloadFile(url, localPath string) error
- func ExtractArchive(archiveURL string, removeArchiveFile bool) string
- func ExtractBranchNames(input string) []string
- func FilterArray[T any](arr []T, condition func(interface{}, int) bool) []interface{}
- func FilterFilesByExtension(files []string, extensions []string, include bool) []string
- func FilterJSONByPredicate(inputJSON []byte, predicate func(key string, value interface{}) bool) ([]byte, error)
- func FilterMap[T any](originalMap map[string]T, predicate func(string, T) bool) map[string]interface{}
- func FindExecutable(executablePrefix, searchDir string) string
- func FolderExists(path string) bool
- func GetCurrentBranch() (string, error)
- func GetCurrentPath() string
- func GetDownloadURLForCurrentOS(release *GitHubRelease) (string, error)
- func GetInputFromStdin(obj GetInputFromStdinStruct) string
- func GetItemsInFolder(folderPath string) ([]string, error)
- func GetItemsInFolderRecursive(folderPath string, recursive bool) ([]string, error)
- func GetParamValue(parameterName string, parameterValue interface{}) interface{}
- func GetSourceFilePath() (string, error)
- func GetType(value interface{}) string
- func GitSparseClone(repoURL string, localDir string, subdirectories ...string) error
- func HasPrefixInArray(str string, prefixes []string, removeSuffix bool) string
- func HasSuffixInArray(str string, suffixes []string, removeSuffix bool) string
- func IsFileOrFolder(path string) (string, error)
- func IsRunningInDocker() bool
- func JoinAndConvertPathToOSFormat(inputPathParts ...string) string
- func MatchAnyGlob(globs []glob.Glob, path string) bool
- func MergeDirectories(sourceDir, targetDir string, overwrite bool) error
- func OverwriteFile(filePath string, content string) error
- func OverwriteMap[T any](targetMap, newMap map[string]T)
- func ProcessFilesMatchingPattern(directory, pattern string, predicateFn func(string)) error
- func ProcessFoldersMatchingPattern(directory, pattern string, predicateFn func(string)) error
- func ReadFile(filePath string) (string, error)
- func RemoveComments(data []byte) ([]byte, error)
- func RemoveContentFromFile(filePath string, contentToRemove []string) error
- func RemoveDrivePath(folderPath string) string
- func RemoveElementsNotInSource[T comparable](source, toRemove []T) []T
- func Reverse(targetArray []string) []string
- func RunCommand(command string, args []string)deprecated
- func RunCommandAndGetOutput(command string, args []string) stringdeprecated
- func RunCommandInSpecifcDirectoryAndGetOutput(command string, args []string, targetDir string) stringdeprecated
- func RunCommandInSpecificDirectory(command string, args []string, targetDir string)deprecated
- func RunCommandWithOptions(options CommandOptions) (string, error)
- func ShowMenu(cliInfo ShowMenuModel, enableOtherOption interface{}) string
- func ShowMenuMultipleOptions(cliInfo ShowMenuMultipleModel, enableOtherOption interface{}) []string
- func TraverseDirectory(config TraverseDirectoryParams) error
- func TruncateStringByRegex(options TruncateStringByRegexOptions) string
- func UnicodeUnquote(bs []byte) []byte
- func WatchDirectory(options WatchDirectoryParams)
- func WriteCustomFormattedJSONToFile(data interface{}, filename string, indentString string) error
- func WriteFormattoJSONFile(data interface{}, filename string)
- type AngularFrontendStruct
- type CommandOptions
- type CopySelectFilesToDestinationStruct
- type CreateStringObjectType
- type DualWriter
- type GetInputFromStdinStruct
- type GetTestNGArgsStruct
- type GitCloneSubdirsStruct
- type GitHubRelease
- type MiscOptimizeImagesStruct
- type ShellCommandOutput
- type ShowMenuModel
- type ShowMenuMultipleModel
- type TakeVariableArgsResultStruct
- type TakeVariableArgsStruct
- type TraverseDirectoryParams
- type TruncateStringByRegexOptions
- type VSCodeSettings
- type WatchDirectoryParams
- type WindmillcodeExtensionPack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddContentToFile ¶
func ArrayContainsAny ¶ added in v4.4.3
func CDToAngularApp ¶
func CDToAngularApp()
func CDToFirebaseApp ¶
func CDToFirebaseApp()
func CDToFlaskApp ¶
func CDToFlaskApp()
func CDToFlutterApp ¶
func CDToFlutterApp()
func CDToLocation ¶
func CDToLocation(location string, opts ...interface{})
func CDToTestNGApp ¶
func CDToTestNGApp()
func CDToWorkspaceRoot ¶
func CDToWorkspaceRoot()
func CompileGlobs ¶ added in v4.2.9
CompileGlobs compiles the string patterns into glob.Glob objects.
func ContainsAny ¶ added in v4.1.0
func ConvertPathToOSFormat ¶
func ConvertToBoolArray ¶
func ConvertToBoolArray(input []interface{}) []bool
func ConvertToByteArray ¶
func ConvertToByteArray(input []interface{}) []byte
func ConvertToComplex128Array ¶
func ConvertToComplex128Array(input []interface{}) []complex128
func ConvertToComplex64Array ¶
func ConvertToComplex64Array(input []interface{}) []complex64
func ConvertToFloat32Array ¶
func ConvertToFloat32Array(input []interface{}) []float32
func ConvertToFloat64Array ¶
func ConvertToFloat64Array(input []interface{}) []float64
func ConvertToInt16Array ¶
func ConvertToInt16Array(input []interface{}) []int16
func ConvertToInt32Array ¶
func ConvertToInt32Array(input []interface{}) []int32
func ConvertToInt64Array ¶
func ConvertToInt64Array(input []interface{}) []int64
func ConvertToInt8Array ¶
func ConvertToInt8Array(input []interface{}) []int8
func ConvertToIntArray ¶
func ConvertToIntArray(input []interface{}) []int
func ConvertToInterfaceArray ¶
func ConvertToInterfaceArray[T any](input []T) []interface{}
func ConvertToRuneArray ¶
func ConvertToRuneArray(input []interface{}) []rune
func ConvertToStringArray ¶
func ConvertToStringArray(input []interface{}) []string
func ConvertToStringBoolMap ¶
func ConvertToStringComplex128Map ¶
func ConvertToStringComplex128Map(originalMap map[string]interface{}) map[string]complex128
func ConvertToStringErrorMap ¶
func ConvertToStringInt16Map ¶
func ConvertToStringInt32Map ¶
func ConvertToStringInt64Map ¶
func ConvertToStringInt8Map ¶
func ConvertToStringIntMap ¶
func ConvertToStringUint8Map ¶
func ConvertToUint16Array ¶
func ConvertToUint16Array(input []interface{}) []uint16
func ConvertToUint32Array ¶
func ConvertToUint32Array(input []interface{}) []uint32
func ConvertToUint64Array ¶
func ConvertToUint64Array(input []interface{}) []uint64
func ConvertToUint8Array ¶
func ConvertToUint8Array(input []interface{}) []uint8
func ConvertToUintArray ¶
func ConvertToUintArray(input []interface{}) []uint
func CopySelectFilesToDestination ¶
func CopySelectFilesToDestination(c CopySelectFilesToDestinationStruct) error
func DecreaseChannelBatchFn ¶
func DownloadFile ¶ added in v4.1.0
func ExtractArchive ¶ added in v4.1.0
func ExtractBranchNames ¶
func FilterArray ¶
func FilterFilesByExtension ¶ added in v4.5.5
func FilterJSONByPredicate ¶
func FindExecutable ¶ added in v4.1.0
func FolderExists ¶
func GetCurrentBranch ¶
func GetCurrentPath ¶
func GetCurrentPath() string
func GetDownloadURLForCurrentOS ¶ added in v4.1.0
func GetDownloadURLForCurrentOS(release *GitHubRelease) (string, error)
func GetInputFromStdin ¶
func GetInputFromStdin(obj GetInputFromStdinStruct) string
func GetItemsInFolder ¶
func GetParamValue ¶
func GetParamValue(parameterName string, parameterValue interface{}) interface{}
func GetSourceFilePath ¶ added in v4.1.0
func GetType ¶
func GetType(value interface{}) string
getType returns the type of a given value as a string
func GitSparseClone ¶
func HasPrefixInArray ¶
func HasSuffixInArray ¶
func IsFileOrFolder ¶
func IsRunningInDocker ¶
func IsRunningInDocker() bool
func MatchAnyGlob ¶ added in v4.2.9
MatchAnyGlob checks if a path matches any of the provided glob patterns.
func MergeDirectories ¶
func OverwriteFile ¶
func OverwriteMap ¶
func RemoveComments ¶ added in v4.5.2
func RemoveContentFromFile ¶ added in v4.3.7
func RemoveDrivePath ¶
func RemoveElementsNotInSource ¶ added in v4.4.3
func RemoveElementsNotInSource[T comparable](source, toRemove []T) []T
func RunCommand
deprecated
func RunCommandAndGetOutput
deprecated
func RunCommandInSpecifcDirectoryAndGetOutput
deprecated
func RunCommandInSpecificDirectory
deprecated
func RunCommandWithOptions ¶
func RunCommandWithOptions(options CommandOptions) (string, error)
func ShowMenu ¶
func ShowMenu(cliInfo ShowMenuModel, enableOtherOption interface{}) string
func ShowMenuMultipleOptions ¶ added in v4.3.6
func ShowMenuMultipleOptions(cliInfo ShowMenuMultipleModel, enableOtherOption interface{}) []string
func TraverseDirectory ¶
func TraverseDirectory(config TraverseDirectoryParams) error
func TruncateStringByRegex ¶
func TruncateStringByRegex(options TruncateStringByRegexOptions) string
func UnicodeUnquote ¶
func WatchDirectory ¶ added in v4.2.5
func WatchDirectory(options WatchDirectoryParams)
func WriteFormattoJSONFile ¶
func WriteFormattoJSONFile(data interface{}, filename string)
Types ¶
type AngularFrontendStruct ¶
type AngularFrontendStruct struct {
Configurations []string `json:"configurations"`
}
type CommandOptions ¶
type CommandOptions struct { CmdObj *exec.Cmd Self *CommandOptions Command string Args []string TargetDir string GetOutput bool PrintOutput bool PrintOutputOnly bool PanicOnError bool NonBlocking bool IsInputFromProgram bool }
func (CommandOptions) EndProcess ¶ added in v4.2.5
func (c CommandOptions) EndProcess() error
type CreateStringObjectType ¶
type CreateStringObjectType struct { Orig string Prefix func() string CamelCase func(stripSuffix bool, suffix string) string Classify func(stripSuffix bool, suffix string) string Capitalize func(stripSuffix bool, suffix string) string Dasherize func(stripSuffix bool, suffix string) string Lowercase func(stripSuffix bool, suffix string) string Uppercase func(stripSuffix bool, suffix string) string Snakecase func(stripSuffix bool, suffix string) string }
CreateStringObjectType represents the structure of the string object.
func CreateStringObject ¶
func CreateStringObject(myStr string, entitySuffix string) (CreateStringObjectType, error)
type DualWriter ¶ added in v4.2.0
type GetInputFromStdinStruct ¶
type GetTestNGArgsStruct ¶
type GetTestNGArgsStruct struct { WorkspaceFolder string EnvVarsFile string TestNGFolder string SuiteFile string ParamEnv string }
func GetTestNGArgs ¶
func GetTestNGArgs(c GetTestNGArgsStruct) GetTestNGArgsStruct
type GitCloneSubdirsStruct ¶
type GitHubRelease ¶ added in v4.1.0
type GitHubRelease struct { TagName string `json:"tag_name"` Assets []struct { Name string `json:"name"` BrowserDownloadURL string `json:"browser_download_url"` } `json:"assets"` }
func GetLatestRelease ¶ added in v4.1.0
func GetLatestRelease(repoURL string) (*GitHubRelease, error)
type ShellCommandOutput ¶
type ShellCommandOutput struct{}
type ShowMenuModel ¶
type ShowMenuModel struct { Default string Other bool OtherString string Prompt string Choices []string // items on the to-do list Selected map[int]string // which to-do items are selected // contains filtered or unexported fields }
func (ShowMenuModel) Init ¶
func (m ShowMenuModel) Init() tea.Cmd
func (ShowMenuModel) View ¶
func (m ShowMenuModel) View() string
type ShowMenuMultipleModel ¶ added in v4.3.6
type ShowMenuMultipleModel struct { Defaults []string // Default selections Prompt string Choices []string // Items on the list Selected map[int]string // Selected items Other bool // Enable 'Other' option OtherString string // String for 'Other' option SelectionLimit int // Maximum number of selections allowed SelectedDelimiter string // Delimiter for selected items in the returned string // contains filtered or unexported fields }
func (ShowMenuMultipleModel) Init ¶ added in v4.3.6
func (m ShowMenuMultipleModel) Init() tea.Cmd
func (ShowMenuMultipleModel) View ¶ added in v4.3.6
func (m ShowMenuMultipleModel) View() string
type TakeVariableArgsResultStruct ¶
func TakeVariableArgs ¶
func TakeVariableArgs(obj TakeVariableArgsStruct) TakeVariableArgsResultStruct
type TakeVariableArgsStruct ¶
type TraverseDirectoryParams ¶
type VSCodeSettings ¶
type VSCodeSettings struct {
ExtensionPack WindmillcodeExtensionPack `json:"windmillcode-extension-pack-0"`
}
func GetSettingsJSON ¶
func GetSettingsJSON(workSpaceFolder string) (VSCodeSettings, error)
type WatchDirectoryParams ¶ added in v4.2.9
type WindmillcodeExtensionPack ¶
type WindmillcodeExtensionPack struct { TasksToRunOnFolderOpen []string `json:"tasksToRunOnFolderOpen"` FlaskBackendDevHelperScript string `json:"flaskBackendDevHelperScript"` FlaskBackendTestHelperScript string `json:"flaskBackendTestHelperScript"` ProxyURLs string `json:"proxyURLs"` SQLDockerContainerName string `json:"sqlDockerContainerName"` DatabaseName string `json:"databaseName"` DatabaseOptions []string `json:"databaseOptions"` OpenAIAPIKey0 string `json:"openAIAPIKey0"` OpenAIAPIBase0 string `json:"openAIAPIBase0"` LangCodes0 string `json:"langCodes0"` PythonVersion0 string `json:"pythonVersion0"` GitCloneSubdirs GitCloneSubdirsStruct `json:"gitCloneSubdirs"` MiscOptimizeImages MiscOptimizeImagesStruct `json:"miscOptimizeImages"` AngularFrontend AngularFrontendStruct `json:"angularFrontend"` }
Click to show internal directories.
Click to hide internal directories.