Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Commit e0d3c5f

Browse files
committed
Fix compilation issue
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
1 parent b811074 commit e0d3c5f

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ require (
2121
github.com/openfaas/openfaas-cloud/edge-auth v0.0.0-20201214095559-b4ad89b94ed9 // indirect
2222
github.com/openfaas/openfaas-cloud/sdk v0.0.0-20201214095559-b4ad89b94ed9 // indirect
2323
github.com/pkg/errors v0.9.1
24+
github.com/sethvargo/go-password v0.1.3
2425
github.com/spf13/cobra v1.1.1
2526
gopkg.in/yaml.v2 v2.3.0
2627
k8s.io/apimachinery v0.20.0 // indirect

go.sum

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,7 @@ github.com/securego/gosec/v2 v2.3.0/go.mod h1:UzeVyUXbxukhLeHKV3VVqo7HdoQR9MrRfF
893893
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
894894
github.com/serialx/hashring v0.0.0-20190422032157-8b2912629002/go.mod h1:/yeG0My1xr/u+HZrFQ1tOQQQQrOawfyMUH13ai5brBc=
895895
github.com/sethvargo/go-password v0.1.2/go.mod h1:qKHfdSjT26DpHQWHWWR5+X4BI45jT31dg6j4RI2TEb0=
896+
github.com/sethvargo/go-password v0.1.3 h1:18KkbGDkw8SuzeohAbWqBLNSfRQblVwEHOLbPa0PvWM=
896897
github.com/sethvargo/go-password v0.1.3/go.mod h1:2tyaaoHK/AlXwh5WWQDYjqQbHcq4cjPj5qb/ciYvu/Q=
897898
github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada/go.mod h1:WWnYX4lzhCH5h/3YBfyVA3VbLYjlMZZAQcW9ojMexNc=
898899
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc=

pkg/types/secrets.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
package types
22

33
import (
4-
"crypto/sha256"
54
"fmt"
65
"log"
76
"os"
87

98
execute "github.com/alexellis/go-execute/pkg/v1"
9+
"github.com/sethvargo/go-password/password"
1010
)
1111

1212
func BuildSecretTask(kvn KeyValueNamespaceTuple) execute.ExecTask {
@@ -63,10 +63,10 @@ func BuildSecretTask(kvn KeyValueNamespaceTuple) execute.ExecTask {
6363
}
6464

6565
func generateSecret() (string, error) {
66-
var err error
67-
pass, err = password.Generate(25, 10, 0, false, true)
66+
67+
pass, err := password.Generate(25, 10, 0, false, true)
6868
if err != nil {
69-
return err
69+
return "", err
7070
}
71-
return pass, err
71+
return pass, nil
7272
}

0 commit comments

Comments
 (0)