Skip to content

Commit

Permalink
implement ci suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
theredditbandit committed May 21, 2024
1 parent 33f6f03 commit e1d8577
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cmd/alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ avlpn or something smaller and use that to query pman`,
return err
}
lastEdit := make(map[string]string)
lastEdit["lastWrite"] = fmt.Sprintf(time.Now().Format("02 Jan 06 15:04"))
lastEdit["lastWrite"] = fmt.Sprint(time.Now().Format("02 Jan 06 15:04"))
err = db.WriteToDB(db.DBName, lastEdit, ConfigBucket)
if err != nil {
log.Print(err)
Expand Down
2 changes: 1 addition & 1 deletion cmd/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var delCmd = &cobra.Command{
return err
}
lastEdit := make(map[string]string)
lastEdit["lastWrite"] = fmt.Sprintf(time.Now().Format("02 Jan 06 15:04"))
lastEdit["lastWrite"] = fmt.Sprint(time.Now().Format("02 Jan 06 15:04"))
err = db.WriteToDB(db.DBName, lastEdit, ConfigBucket)
if err != nil {
log.Print(err)
Expand Down
2 changes: 1 addition & 1 deletion cmd/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var setCmd = &cobra.Command{
}

lastEdit := make(map[string]string)
lastEdit["lastWrite"] = fmt.Sprintf(time.Now().Format("02 Jan 06 15:04"))
lastEdit["lastWrite"] = fmt.Sprint(time.Now().Format("02 Jan 06 15:04"))
err = db.WriteToDB(db.DBName, lastEdit, ConfigBucket)
if err != nil {
log.Print(err)
Expand Down
2 changes: 1 addition & 1 deletion pkg/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func InitDirs(args []string) error {
return err
}
lastEdit := make(map[string]string)
lastEdit["lastWrite"] = fmt.Sprintf(time.Now().Format("02 Jan 06 15:04"))
lastEdit["lastWrite"] = fmt.Sprint(time.Now().Format("02 Jan 06 15:04"))
err = db.WriteToDB(db.DBName, lastEdit, ConfigBucket)
if err != nil {
log.Print(err)
Expand Down
5 changes: 1 addition & 4 deletions pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,5 @@ func DayPassed(t string) bool {
oneDay := 86400
now := time.Now().Unix()
recTime, _ := strconv.ParseInt(t, 10, 64)
if now-recTime > int64(oneDay) {
return true
}
return false
return now-recTime > int64(oneDay)
}

0 comments on commit e1d8577

Please sign in to comment.