~kota/tide

44113e09da65e29607c57fc83795480cc47704dc — Dakota Walsh 1 year, 4 months ago 39f7bed
improve getDuration documentation
1 files changed, 3 insertions(+), 1 deletions(-)

M main.go
M main.go => main.go +3 -1
@@ 130,7 130,9 @@ func getDate(year, month, day string) (time.Time, error) {
	return t, err
}

// getDuration takes a string in the hh:mm format and returns a time.Duration
// getDuration takes a string in the hh:mm format and returns a time.Duration.
// The string is split into slice t and then formatted into the
// time.ParseDuration format.
func getDuration(s string) (time.Duration, error) {
	f := func(c rune) bool {
		return !unicode.IsLetter(c) && !unicode.IsNumber(c)