Skip to content

Commit bca7566

Browse files
committed
Ditch the SavePath
1 parent 2796faf commit bca7566

3 files changed

Lines changed: 1 addition & 9 deletions

File tree

‎cmd/configure.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ func Configure(ctx *cli.Context) {
1717
if err != nil {
1818
log.Fatal(err)
1919
}
20-
c.SavePath(ctx.GlobalString("config"))
2120

2221
key := ctx.String("key")
2322
host := ctx.String("host")

‎config/config.go‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,6 @@ func (c *Config) Read(file string) error {
147147
return nil
148148
}
149149

150-
// SavePath allows the user to customize the location of the JSON file.
151-
func (c *Config) SavePath(file string) {
152-
if file != "" {
153-
c.File = file
154-
}
155-
}
156-
157150
// Write() saves the config as JSON.
158151
func (c *Config) Write() error {
159152
c.ExercismDirectory = ""

‎config/config_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ func TestReadingWritingConfig(t *testing.T) {
107107
Dir: "/exercism/directory",
108108
API: "localhost",
109109
XAPI: "localhost",
110+
File: filename,
110111
}
111112
c1.configure()
112113

113-
c1.SavePath(filename)
114114
c1.Write()
115115

116116
c2, err := Read(filename)

0 commit comments

Comments
 (0)