fix: Startup error

Fixed a path error that prompted that the configuration file could not be found at startup
pull/11/head
antcorp 4 years ago committed by GitHub
parent 7d7818bc38
commit c1504d06bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3,6 +3,7 @@ package config
import ( import (
"gopkg.in/yaml.v3" "gopkg.in/yaml.v3"
"io/ioutil" "io/ioutil"
"os"
) )
var Config config var Config config
@ -147,6 +148,7 @@ type config struct {
} }
func init() { func init() {
path, _ := os.Getwd()
bytes, err := ioutil.ReadFile("../config/config.yaml") bytes, err := ioutil.ReadFile("../config/config.yaml")
if err != nil { if err != nil {
panic(err) panic(err)

Loading…
Cancel
Save