gotp
gotp copied to clipboard
totp.go times other than now
Good afternoon;
In the totp.go function "At" you've got an 'int' timestamp - presumably a UNIX time integer - being fed into that function.
Seeing as you've already got "time" as a dependency, perhaps it might be better for that to be a "Time" object? This way, users of the library can have the Time functions calculate the various windows and such rather than having to extract the current or future time, do the conversion, and then convert to an int to feed into that function.
I already have to call https://golang.org/pkg/time/#Unix to get that, after all
Yes, actually we can add extra method which will accept Time struct as parameter.
Maybe also solve #10 by adding extra method.
Closing this issue, implemented in #24
Oh awesome; thank you!