~alazarte/uploader

054f87e623c8f73f6adb972bb01ab1de9cb038ee — alazarte 2 months ago 0453a72
Fix secrets index panic
1 files changed, 4 insertions(+), 1 deletions(-)

M main.go
M main.go => main.go +4 -1
@@ 88,7 88,7 @@ func init() {
	flag.Parse()

	if outputPath == "" || secretsFilepath == "" {
		fmt.Println("either missimg output path or secrets filepath")
		fmt.Println("either missing output path or secrets filepath")
		fmt.Println("usage:")
		flag.PrintDefaults()
		os.Exit(1)


@@ 129,6 129,9 @@ func init() {
		}
	} else {
		rot.rotate = func() {
			if secretIndex >= len(secrets) {
				secretIndex = 0
			}
			secretCurrent = secrets[secretIndex]
			log.Println("current secret:", secretCurrent)
			secretIndex++