Documentation ¶
Index ¶
- Constants
- Variables
- func AskYesNo(defaultValue bool, prompt string, args ...any) bool
- func DirectoryExists(dirName string) error
- func DurationString(d time.Duration) string
- func FileExists(fileName string) error
- func GetDefaultDataFolder() string
- func GetShellData() (shellProfile string, thisPath string)
- func GetUser() string
- func InputText(prompt string, defaultValue string) string
- func Tern(cond bool, a, b string) string
- type BackupFiles
- type TreeNode
Constants ¶
View Source
const ( TreeBranchChar = "├── " TreeNodeChar = "│ " TreeLastChar = "└── " )
Variables ¶
View Source
var ( AppName = "todo-cli" Version = "0.1.0" BuildHost = "dev" BuildDate = "2021-08-01T00:00:00Z" AppDescription = AppName + " v" + Version )
Functions ¶
func DirectoryExists ¶ added in v0.1.0
func DurationString ¶ added in v0.1.0
func FileExists ¶ added in v0.1.0
FileExists returns true if the file exists and is not a directory TODO: Substituir todos os os.Stat por esta funçãos
func GetDefaultDataFolder ¶ added in v0.1.0
func GetDefaultDataFolder() string
func GetShellData ¶
Types ¶
type BackupFiles ¶ added in v0.1.0
type BackupFiles struct {
// contains filtered or unexported fields
}
func NewBackupFiles ¶ added in v0.1.0
func (*BackupFiles) GetBackupFiles ¶ added in v0.1.0
func (b *BackupFiles) GetBackupFiles() (backupFiles []string, err error)
func (*BackupFiles) GetLastBackupFile ¶ added in v0.1.0
func (b *BackupFiles) GetLastBackupFile() string
func (*BackupFiles) GetNewBackupFileName ¶ added in v0.1.0
func (b *BackupFiles) GetNewBackupFileName() string
func (*BackupFiles) Purge ¶ added in v0.1.0
func (b *BackupFiles) Purge() (err error)
Click to show internal directories.
Click to hide internal directories.