internal

package
v0.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AskCleanup added in v0.3.4

func AskCleanup() bool

func AskDiscovery

func AskDiscovery() bool

func AskLanguage

func AskLanguage(fileNames []string, selected []string, files map[string]string) ([]string, []string)

func AskOverwrite

func AskOverwrite() string

func CleanupMultipleFiles added in v0.3.4

func CleanupMultipleFiles(files []string, langKeys []string) string

func Contains

func Contains[T comparable](list []T, item T) bool

func DiscoverRelevantFiles added in v0.3.4

func DiscoverRelevantFiles(allFiles []string) ([]string, map[string]string)

func FileExists

func FileExists(path string) bool

func FindFileMatches

func FindFileMatches(patterns string) bool

func GatherPreviousCommentGroup

func GatherPreviousCommentGroup(i int, lastTakenIdx int, lines []string, keep []string) []string

func GetAllRaw

func GetAllRaw(selected []string, selectedKeys []string) string

func GetCacheDir

func GetCacheDir() string

func GetGitignores

func GetGitignores(sourceDir string) ([]string, error)

func GetLanguageSelections

func GetLanguageSelections(files map[string]string, fileNames []string) ([]string, []string)

func GetNeedsUpdate

func GetNeedsUpdate() bool

func GlobExists

func GlobExists(path string) bool

func HandleErr

func HandleErr(err error)

func HandleFileOverwrite

func HandleFileOverwrite(path string, contents string)

func Insert

func Insert[T any](a []T, i int, item T) []T

func LangHeader

func LangHeader(langName string) string

func PrepareGitignores

func PrepareGitignores() ([]string, error)

func Quit

func Quit()

func ReadFile

func ReadFile(path string) string

func RemoveCacheDir added in v0.3.4

func RemoveCacheDir()

func RemoveUnusedPatterns

func RemoveUnusedPatterns(contents string) string

func RunCmd

func RunCmd(cmd string, args ...string) (string, error)

func Ternary

func Ternary[T any](cond bool, whenTrue T, whenFalse T) T

func ToString

func ToString[T any](obj T) string

func UNUSED

func UNUSED(x ...interface{})

UNUSED allows unused variables to be included in Go programs

func WriteFile

func WriteFile(path string, data string, overwrite bool) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL