move some stuff around

This commit is contained in:
2026-07-24 21:11:33 -07:00
parent 0064294c3c
commit 98c8b453a0
3 changed files with 36 additions and 28 deletions
+28
View File
@@ -0,0 +1,28 @@
package main
import (
"encoding/json"
"fmt"
"os"
)
type Config struct {
URL string `json:"url"`
Username string `json:"username"`
Password string `json:"password"`
}
var serverConfig Config
func read_config() {
file, err := os.ReadFile("config.json")
if err != nil {
fmt.Print(err.Error())
return
}
err = json.Unmarshal(file, &serverConfig)
if err != nil {
fmt.Print(err.Error())
}
}