Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var BotId string
Functions ¶
func AppendToFile ¶
AppendToFile makes a number of attempts to call tryAppendFile. If it succeeds appending the data to file without error, it returns immediately. If an error occurs, it retries up to data.MaxWriteAttempts number of calls. If all write attempts fail, it tries writing the data to a backup file and returns an error
func OverwriteFile ¶
OverwriteFile works with any map[string]type. It attempts overwriting the file at path 'fileName' with the map passed to 'dataIn'. If any 'temporary' type errors are encountered, it retries overwriting up to 'MaxOverwriteAttempts' number of times. If all ovewrite attempts fail, it tries writing the data to a backup file of the same name. It returns an error if data was written to a backup file whether successful or not, or when non temporary error occurs.
Types ¶
This section is empty.