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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

29 lines
451 B

package main
import (
"os"
"log"
)
const SettingsFile string = "settings.toml"
func SettingsFileExists() bool {
if _, err := os.Stat(SettingsPath + SettingsFile); err != nil {
return false
}
return true
}
func WriteSettingsFile(data []string) {
sFile, err := os.Open(SettingsPath + SettingsFile)
defer sFile.Close()
if err != nil {
log.Fatal("couldn't open settings file")
}
for _, s := range data {
sFile.Write([]byte(s))
}
}