internal

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 CleanupMultiple

func CleanupMultiple(selected []string, keys []string) string

func Contains

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

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 GetCleanupSelection

func GetCleanupSelection() bool

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 GetRelevantFiles

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

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 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