From a590dd69657a79e800bd420b363d8090d30b487d Mon Sep 17 00:00:00 2001 From: Robin Scherrer Date: Thu, 31 Mar 2022 10:17:19 +0200 Subject: [PATCH] Configure renovate --- .github/renovate.json | 7 +++++++ main.go | 5 +++++ renovate.json | 5 ----- 3 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 .github/renovate.json delete mode 100644 renovate.json diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 0000000..2ffad06 --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,7 @@ +{ + "extends": [ + "config:base" + ], + "labels": ["dependencies"], + "postUpdateOptions": ["gomodTidy"] +} diff --git a/main.go b/main.go index c28815e..e99bb3d 100644 --- a/main.go +++ b/main.go @@ -24,5 +24,10 @@ func main() { if *secretKey == "" { log.Fatal("secretkey cannot be empty") } + + if len(*secretKey) != 16 && len(*secretKey) != 32 { + log.Fatal("secretkey must be 16 or 32 characters long") + } + fmt.Print(gotp.NewDefaultTOTP(*secretKey).Now()) } diff --git a/renovate.json b/renovate.json deleted file mode 100644 index f45d8f1..0000000 --- a/renovate.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": [ - "config:base" - ] -}