summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gac.go1
-rw-r--r--main.go2
2 files changed, 2 insertions, 1 deletions
diff --git a/gac.go b/gac.go
index 11d1910..4f83fa7 100644
--- a/gac.go
+++ b/gac.go
@@ -14,6 +14,7 @@ import (
const period = 30
+// Code returns the TOTP code and time remaining for the given secret and time.
func Code(secret string) (string, int) {
t := time.Now().Unix()
numIntervals := t / period
diff --git a/main.go b/main.go
index 31fa5ea..340624e 100644
--- a/main.go
+++ b/main.go
@@ -111,7 +111,7 @@ func parseStdin() []provider {
ps = append(ps, *p)
}
- nameLength += 1
+ nameLength++
return ps
}