Skip to content
This repository has been archived by the owner on Jul 3, 2021. It is now read-only.

Commit

Permalink
return err
Browse files Browse the repository at this point in the history
  • Loading branch information
yabetsu93 committed Jan 1, 2021
1 parent 828dfda commit bc63590
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions flags/duration.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package flags

import (
"flag"
"fmt"
"regexp"
"strconv"
"time"
Expand All @@ -22,7 +21,7 @@ func (d *durationValue) Set(s string) error {
}
v, err := time.ParseDuration(s)
if err != nil {
return fmt.Errorf("failed to parse string time: %v", err)
return err
}
*d = durationValue(v)
return nil
Expand Down
3 changes: 1 addition & 2 deletions flags/unixtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package flags

import (
"flag"
"fmt"
"time"
)

Expand All @@ -15,7 +14,7 @@ func (t *unixTime) String() string {
func (t *unixTime) Set(s string) error {
parsed, err := time.Parse(time.UnixDate, s)
if err != nil {
return fmt.Errorf("failed to parse string time: %v", err)
return err
}
*t = unixTime(parsed)
return nil
Expand Down

0 comments on commit bc63590

Please sign in to comment.