From f3fbf854031cb9d6b5741f0e9d652916a68e3ff9 Mon Sep 17 00:00:00 2001 From: Mladen Jablanovic Date: Tue, 27 Jan 2026 14:49:15 +0100 Subject: [PATCH] feat(go): More accurate config section naming #SCD-687 --- clients/go/config.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/clients/go/config.go b/clients/go/config.go index d1124467..5588abc3 100644 --- a/clients/go/config.go +++ b/clients/go/config.go @@ -3,7 +3,6 @@ package phrase import ( "errors" "fmt" - "io/ioutil" "os" "path/filepath" @@ -32,8 +31,8 @@ type Config struct { Defaults map[string]map[string]interface{} - Targets []byte - Sources []byte + Pull []byte + Push []byte UserAgent string } @@ -83,7 +82,7 @@ func configContent(cfgFilePath string) ([]byte, error) { case path == "": return nil, nil default: - return ioutil.ReadFile(path) + return os.ReadFile(path) } } @@ -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 {