1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-13 05:31:08 +08:00

chore: remove debug log at build

This commit is contained in:
源文雨
2024-08-03 15:32:31 +08:00
parent 08688b584b
commit fa9abff1a8
13 changed files with 218 additions and 78 deletions

View File

@@ -2,9 +2,9 @@ package config
import (
"bytes"
"log"
"os"
"github.com/sirupsen/logrus"
"gopkg.in/yaml.v3"
)
@@ -42,11 +42,11 @@ type Peer struct {
func Parse(path string) (c Config) {
file, err := os.ReadFile(path)
if err != nil {
log.Fatal("open config file failed:", err)
logrus.Fatal("open config file failed:", err)
}
err = yaml.NewDecoder(bytes.NewReader(file)).Decode(&c)
if err != nil {
log.Fatal("invalid config file:", err)
logrus.Fatal("invalid config file:", err)
}
return
}