@@ -43,11 +43,6 @@ type Config struct {
4343 XAPI string `json:"xapi"`
4444 File string `json:"-"` // full path to config file
4545 home string // cache user's home directory
46-
47- // deprecated, get rid of them when nobody uses 1.7.0 anymore
48- ExercismDirectory string `json:"exercismDirectory,omitempty"`
49- Hostname string `json:"hostname,omitempty"`
50- ProblemsHost string `json:"problemsHost,omitempty"`
5146}
5247
5348// Home returns the user's canonical home directory.
@@ -149,10 +144,6 @@ func (c *Config) Read(file string) error {
149144
150145// Write() saves the config as JSON.
151146func (c * Config ) Write () error {
152- c .ExercismDirectory = ""
153- c .Hostname = ""
154- c .ProblemsHost = ""
155-
156147 // truncates existing file if it exists
157148 f , err := os .Create (c .File )
158149 if err != nil {
@@ -167,18 +158,10 @@ func (c *Config) Write() error {
167158func (c * Config ) configure () (* Config , error ) {
168159 c .sanitize ()
169160
170- if c .Hostname != "" {
171- c .API = c .Hostname
172- }
173-
174161 if c .API == "" {
175162 c .API = hostAPI
176163 }
177164
178- if c .ProblemsHost != "" {
179- c .XAPI = c .ProblemsHost
180- }
181-
182165 if c .XAPI == "" {
183166 c .XAPI = hostXAPI
184167 }
@@ -188,11 +171,6 @@ func (c *Config) configure() (*Config, error) {
188171 return c , err
189172 }
190173
191- // use legacy value, if it exists
192- if c .ExercismDirectory != "" {
193- c .Dir = c .ExercismDirectory
194- }
195-
196174 if c .Dir == "" {
197175 // fall back to default value
198176 c .Dir = filepath .Join (homeDir , DirExercises )
@@ -228,6 +206,4 @@ func (c *Config) sanitize() {
228206 c .Dir = strings .TrimSpace (c .Dir )
229207 c .API = strings .TrimSpace (c .API )
230208 c .XAPI = strings .TrimSpace (c .XAPI )
231- c .Hostname = strings .TrimSpace (c .Hostname )
232- c .ProblemsHost = strings .TrimSpace (c .ProblemsHost )
233209}
0 commit comments