Skip to content

Commit

Permalink
Merge branch 'master' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
ikr4-m committed Sep 2, 2024
2 parents f7c2b26 + 7099311 commit 4b7732e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions internal/rw_config_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,21 @@ func (c ConfigSourceAuth) WriteConfig() (err error) {
return nil
}

func (c ConfigSourceAuth) WriteConfig() (err error) {
strJsonByte, err := json.Marshal(c)
if err != nil {
return err
}
strConfig := base64.StdEncoding.EncodeToString(strJsonByte)
err = os.WriteFile(ConfigFileLocation, []byte(strConfig), 0644)
if err != nil {
return err
}

fmt.Println("Config file is saved on", ConfigFileLocation)
return nil
}

func (c ConfigSourceAuth) ParseConfig(conf *ConfigSourceAuth) error {
if !CheckConfigFileExist() {
return errors.New("No config file on local. Please log in first.")
Expand Down

0 comments on commit 4b7732e

Please sign in to comment.