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

Commit

Permalink
Fix compilation issue
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Dec 15, 2020
1 parent b811074 commit e0d3c5f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ require (
github.com/openfaas/openfaas-cloud/edge-auth v0.0.0-20201214095559-b4ad89b94ed9 // indirect
github.com/openfaas/openfaas-cloud/sdk v0.0.0-20201214095559-b4ad89b94ed9 // indirect
github.com/pkg/errors v0.9.1
github.com/sethvargo/go-password v0.1.3
github.com/spf13/cobra v1.1.1
gopkg.in/yaml.v2 v2.3.0
k8s.io/apimachinery v0.20.0 // indirect
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,7 @@ github.com/securego/gosec/v2 v2.3.0/go.mod h1:UzeVyUXbxukhLeHKV3VVqo7HdoQR9MrRfF
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/serialx/hashring v0.0.0-20190422032157-8b2912629002/go.mod h1:/yeG0My1xr/u+HZrFQ1tOQQQQrOawfyMUH13ai5brBc=
github.com/sethvargo/go-password v0.1.2/go.mod h1:qKHfdSjT26DpHQWHWWR5+X4BI45jT31dg6j4RI2TEb0=
github.com/sethvargo/go-password v0.1.3 h1:18KkbGDkw8SuzeohAbWqBLNSfRQblVwEHOLbPa0PvWM=
github.com/sethvargo/go-password v0.1.3/go.mod h1:2tyaaoHK/AlXwh5WWQDYjqQbHcq4cjPj5qb/ciYvu/Q=
github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada/go.mod h1:WWnYX4lzhCH5h/3YBfyVA3VbLYjlMZZAQcW9ojMexNc=
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc=
Expand Down
10 changes: 5 additions & 5 deletions pkg/types/secrets.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package types

import (
"crypto/sha256"
"fmt"
"log"
"os"

execute "github.com/alexellis/go-execute/pkg/v1"
"github.com/sethvargo/go-password/password"
)

func BuildSecretTask(kvn KeyValueNamespaceTuple) execute.ExecTask {
Expand Down Expand Up @@ -63,10 +63,10 @@ func BuildSecretTask(kvn KeyValueNamespaceTuple) execute.ExecTask {
}

func generateSecret() (string, error) {
var err error
pass, err = password.Generate(25, 10, 0, false, true)

pass, err := password.Generate(25, 10, 0, false, true)
if err != nil {
return err
return "", err
}
return pass, err
return pass, nil
}

0 comments on commit e0d3c5f

Please sign in to comment.