Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
qw1mb0 committed Sep 23, 2019
0 parents commit 1cb26a2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/qw1mb0/minutes

go 1.12
24 changes: 24 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package main

import (
"bufio"
"fmt"
"time"
"log"
"os"
"strings"
)

func main() {
reader := bufio.NewReader(os.Stdin)
input, err := reader.ReadString('\n')
if err != nil {
log.Fatal("failed to read stdin: %s", err)
}
input = strings.TrimSuffix(input, "\n")
bro, err := time.ParseDuration(input)
if err != nil {
log.Fatal("failed to parse: %s", err)
}
fmt.Println(bro.Minutes())
}

0 comments on commit 1cb26a2

Please sign in to comment.