switching to use github.com/goccy/go-yaml

This commit is contained in:
2025-05-27 23:34:47 +09:00
parent 54e9e208f4
commit db9fc1f4d9
3 changed files with 7 additions and 16 deletions

View File

@ -14,7 +14,9 @@ import "os"
import "strings"
import "time"
import "gopkg.in/yaml.v3"
//import "gopkg.in/yaml.v3"
import yaml "github.com/goccy/go-yaml"
type ServerTLSConfig struct {
Enabled bool `yaml:"enabled"`
@ -155,7 +157,7 @@ func load_server_config(cfgfile string) (*ServerConfig, error) {
return nil, err
}
yd = yaml.NewDecoder(f)
yd = yaml.NewDecoder(f, yaml.AllowDuplicateMapKey(), yaml.DisallowUnknownField())
err = yd.Decode(&cfg)
f.Close()
if err != nil {