summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCasey Robinson <casey.robinson@distilnetworks.com>2014-12-17 15:22:58 -0500
committerCasey Robinson <casey.robinson@distilnetworks.com>2014-12-17 15:22:58 -0500
commit33e493b06315e065b7a85233eb49b531b953c9cb (patch)
treeeb4f00872385de111f9493302055d52a9b4acdc3
parentd490019a6c7180870992011f5a6f8f9b6b4422fd (diff)
downloadonetime-33e493b06315e065b7a85233eb49b531b953c9cb.tar.gz
onetime-33e493b06315e065b7a85233eb49b531b953c9cb.tar.bz2
onetime-33e493b06315e065b7a85233eb49b531b953c9cb.zip
improve style via go lint
-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
}