clotas

package
v0.0.0-...-0a9c678 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultDateLayout = "20060102"
View Source
const DefaultFileMode = 0755
View Source
const DefaultFileType = "sh"
View Source
const DefaultScriptName = "script"
View Source
const DefaultSeparator = "-"
View Source
const DefaultTargetFolder = "clotas"
View Source
const DefaultTemplate = `` /* 249-byte string literal not displayed */

Variables

This section is empty.

Functions

func AssureClotasDir

func AssureClotasDir(folder string)

AssureClotasDir Make sure Clotas folder exists.

func GenerateName

func GenerateName(scriptName string, t time.Time, n int) string

func GetFiles

func GetFiles(folder string) []string

Types

type ClotaFile

type ClotaFile struct {
	Name string // filename
	// contains filtered or unexported fields
}

func GetFileListForDay

func GetFileListForDay(folder string, t time.Time) []ClotaFile

func (*ClotaFile) CreateFile

func (cf *ClotaFile) CreateFile()

CreateFile /** Create actual file on the file system and update the object with information.

func (ClotaFile) GetNext

func (ClotaFile) GetNext(file ClotaFile, scriptName string) *ClotaFile

GetNext /** Generate new ClotaFile object, with incremented serial number from an existing provided file.

func (ClotaFile) GetNextFromList

func (ClotaFile) GetNextFromList(files []ClotaFile, scriptName string) *ClotaFile

GetNextFromList /** Generate new ClotaFile object from provided list of ClotaFile-s with incremented serial.

func (ClotaFile) New

func (ClotaFile) New(scriptName string, n int, t *time.Time) *ClotaFile

New Create new ClotaFile object from basic provided info. No actual file is created. @param scriptName string (Optional) If empty, defaults to DefaultScriptName. @param n int (Optional) If negative number is provided defaults to 1. @param t *time.Time (Optional) If empty, set to Now; used for the date in the file name.

func (ClotaFile) NewFromFile

func (ClotaFile) NewFromFile(file string) *ClotaFile

func (ClotaFile) NewFromFileInfo

func (ClotaFile) NewFromFileInfo(file os.FileInfo) *ClotaFile

Jump to

Keyboard shortcuts

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