a simple url shortener in Go (check it out at qurl.org)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
444 B

package main
import (
func manageBackup(stor storage.Storage, dir string, interval int) {
for {
time.Sleep(time.Duration(interval) * time.Second)
fname := fmt.Sprintf("qurl-%s.backup",
err := stor.Backup(path.Join(dir, fname))
if err != nil {
fmt.Fprintf(os.Stderr, "Backup failure: %s\n", err.Error())