config: gen default configuration file

This commit is contained in:
singchia
2024-05-02 17:01:33 +08:00
parent 889494ce59
commit 28f9af4434
11 changed files with 476 additions and 91 deletions

View File

@@ -0,0 +1,18 @@
package config
import (
"os"
"testing"
)
func TestGenDefaultConfig(t *testing.T) {
file, err := os.OpenFile("../../../etc/frontlas.yaml", os.O_CREATE|os.O_RDWR, 0666)
if err != nil {
t.Error(err)
}
defer file.Close()
err = genDefaultConfig(file)
if err != nil {
t.Error(err)
}
}