Skip to content

Commit

Permalink
fix lint, spelling
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Vaumoron <dvaumoron@gmail.com>
  • Loading branch information
dvaumoron committed Jul 7, 2024
1 parent 6aeaf82 commit bf24506
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions versionmanager/lastuse/last.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func Read(dirPath string, displayer loghelper.Displayer) time.Time {
return time.Time{}
}

parsed, err := time.Parse(time.DateOnly, string(data))
parsed, err := time.Parse(time.DateOnly, string(data)) //nolint
if err != nil {
displayer.Log(hclog.Warn, "Unable to parse date in file", loghelper.Error, err)

Expand All @@ -52,7 +52,7 @@ func Read(dirPath string, displayer loghelper.Displayer) time.Time {

func WriteNow(dirPath string, displayer loghelper.Displayer) {
lastUsePath := filepath.Join(dirPath, fileName)
nowData := time.Now().AppendFormat(nil, time.DateOnly)
nowData := time.Now().AppendFormat(nil, time.DateOnly) //nolint

if err := os.WriteFile(lastUsePath, nowData, 0o644); err != nil {
displayer.Log(hclog.Warn, "Unable to write date in file", loghelper.Error, err)
Expand Down
4 changes: 2 additions & 2 deletions versionmanager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,9 @@ func (m VersionManager) Uninstall(requestedVersion string) error {

buffer := make([]byte, 1)
os.Stdin.Read(buffer)
readed := buffer[0]
read := buffer[0]

if doUninstall := readed == 'y' || readed == 'Y'; !doUninstall {
if doUninstall := read == 'y' || read == 'Y'; !doUninstall {
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion versionmanager/semantic/uninstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func SelectVersionsToUninstall(behaviourOrConstraint string, installPath string,
case strings.HasPrefix(behaviourOrConstraint, notUsedSincePrefix):
dateStr := behaviourOrConstraint[notUsedSincePrefixLen:]

beforeDate, err := time.Parse(time.DateOnly, dateStr)
beforeDate, err := time.Parse(time.DateOnly, dateStr) //nolint
if err != nil {
return nil, err
}
Expand Down

0 comments on commit bf24506

Please sign in to comment.