Util functions
This commit is contained in:
parent
6ecf0ac469
commit
ed1c9ad353
|
@ -0,0 +1,24 @@
|
|||
package main
|
||||
|
||||
import "os"
|
||||
|
||||
func folderExists(folderPath string) bool {
|
||||
_, err := os.Stat(folderPath)
|
||||
|
||||
return !os.IsNotExist(err)
|
||||
}
|
||||
|
||||
func createSettings() {
|
||||
// TO DO:
|
||||
// Create JSON file with default settings
|
||||
|
||||
type DefaultSettings struct {
|
||||
AuthenticationCookie string
|
||||
}
|
||||
}
|
||||
|
||||
func loadSettings() {
|
||||
// Check if JSON file exists
|
||||
// If so, load into struct
|
||||
// Else, create settings and return
|
||||
}
|
Reference in New Issue