Skip to content

Commit 858abd2

Browse files
committed
Add comments to exported consts
golint: exported const SolutionFilename should have comment or be unexported [Warning]
1 parent 642f601 commit 858abd2

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

workspace/solution.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ import (
1010
"time"
1111
)
1212

13+
// IgnoreSubdir is the name of the hidden directory to be ignored on submit.
1314
const IgnoreSubdir = ".exercism"
15+
16+
// SolutionFilename is the name of the solution metadata file.
1417
const SolutionFilename = "solution.json"
1518

1619
var solutionRealPath = filepath.Join(IgnoreSubdir, SolutionFilename)
@@ -67,10 +70,10 @@ func (s *Solution) Write(path string) error {
6770
if err != nil {
6871
return err
6972
}
70-
if err := createIgnoreSubdir(path); err != nil {
73+
if err = createIgnoreSubdir(path); err != nil {
7174
return err
7275
}
73-
if err := ioutil.WriteFile(filepath.Join(path, solutionRealPath), b, os.FileMode(0600)); err != nil {
76+
if err = ioutil.WriteFile(filepath.Join(path, solutionRealPath), b, os.FileMode(0600)); err != nil {
7477
return err
7578
}
7679
s.Dir = path
@@ -103,7 +106,6 @@ func migrateLegacySolutionFile(legacySolutionPath string, solutionPath string) e
103106
if err := createIgnoreSubdir(filepath.Dir(legacySolutionPath)); err != nil {
104107
return err
105108
}
106-
// if the solution file exists in the new location, don't migrate
107109
if _, err := os.Lstat(solutionPath); err != nil {
108110
if err := os.Rename(legacySolutionPath, solutionPath); err != nil {
109111
return err

0 commit comments

Comments
 (0)