mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
remove unused confg package
This commit is contained in:
parent
955479486a
commit
284a0676f7
|
@ -1,24 +0,0 @@
|
|||
package config
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
)
|
||||
|
||||
func LoadConfigFile(filename string, v interface{}) error {
|
||||
data, err := ioutil.ReadFile(filename)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return json.Unmarshal(data, v)
|
||||
}
|
||||
|
||||
func SaveConfigFile(filename string, v interface{}) error {
|
||||
out, err := json.MarshalIndent(v, "", " ")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return ioutil.WriteFile(filename, out, 0644)
|
||||
}
|
Loading…
Reference in New Issue
Block a user