Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsFilePresent ¶
IsFilePresent returns true if a file with the given path exists. If the path points to a directory, it also returns false.
Types ¶
type Log ¶
type Log struct {
Context string
}
Log provides logging methods. Provide the given context (file or package name for example) to be displayed in the log messages.
type StringRingList ¶
type StringRingList struct { Items []string // contains filtered or unexported fields }
StringRingList represents a ringed list of strings. You can retrieve items by calling Next().
func NewFileRingList ¶
func NewFileRingList(root string) StringRingList
NewFileRingList will construct a new StringRingList containing the relative pathes to all files within the given directory.
func (*StringRingList) Next ¶
func (list *StringRingList) Next() (string, error)
Next returns the next item form the ring list. Wrap around is done automatically, so no need to check current index. It will throw an error, if the list is empty.
func (*StringRingList) Shuffle ¶ added in v0.3.0
func (list *StringRingList) Shuffle()
Shuffle randomizes the order of elements in the given list
type TimeInterval ¶
TimeInterval defines a time interval, determined by start and end hour