Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions clients/go/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package phrase
import (
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"

Expand Down Expand Up @@ -32,8 +31,8 @@ type Config struct {

Defaults map[string]map[string]interface{}

Targets []byte
Sources []byte
Pull []byte
Push []byte

UserAgent string
}
Expand Down Expand Up @@ -83,7 +82,7 @@ func configContent(cfgFilePath string) ([]byte, error) {
case path == "":
return nil, nil
default:
return ioutil.ReadFile(path)
return os.ReadFile(path)
}
}

Expand Down Expand Up @@ -141,8 +140,8 @@ func (cfg *Config) UnmarshalYAML(unmarshal func(i interface{}) error) error {
"per_page": &cfg.PerPage,
"project_id": &cfg.DefaultProjectID,
"file_format": &cfg.DefaultFileFormat,
"push": &cfg.Sources,
"pull": &cfg.Targets,
"push": &cfg.Push,
"pull": &cfg.Pull,
"defaults": &m,
})
if err != nil {
Expand Down
Loading