File tree Expand file tree Collapse file tree 4 files changed +27
-6
lines changed Expand file tree Collapse file tree 4 files changed +27
-6
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ ignored = ["github.com/Azure/go-ansiterm*"]
3131
3232[[constraint ]]
3333 name = " github.com/fnproject/fn_go"
34- version = " 0.2.11 "
34+ version = " 0.2.12 "
3535
3636[[constraint ]]
3737 name = " github.com/giantswarm/semver-bump"
Original file line number Diff line number Diff line change @@ -2,8 +2,11 @@ package main
22
33import (
44 "bytes"
5+ "crypto/rand"
6+ "encoding/base32"
57 "fmt"
68 "io"
9+ "log"
710 "os"
811 "sort"
912 "strings"
@@ -18,6 +21,16 @@ import (
1821 "github.com/urfave/cli"
1922)
2023
24+ func getRequestID () string {
25+ byteArr := make ([]byte , 16 )
26+ _ , err := rand .Read (byteArr )
27+ if err != nil {
28+ log .Fatalf ("failed to generate random number for requestID" )
29+ }
30+
31+ return base32 .StdEncoding .WithPadding (base32 .NoPadding ).EncodeToString (byteArr )
32+ }
33+
2134func newFn () * cli.App {
2235 app := cli .NewApp ()
2336 app .Name = "fn"
@@ -30,7 +43,6 @@ func newFn() *cli.App {
3043 if err != nil {
3144 return err
3245 }
33-
3446 viper .Set (common .RequestID , common .GetRequestID ())
3547 commandArgOverrides (c )
3648 return nil
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import (
1212
1313 "github.com/fnproject/cli/client"
1414 "github.com/fnproject/cli/common"
15- fnclient "github.com/fnproject/fn_go/client"
15+ fnclient "github.com/fnproject/fn_go/client"
1616 apiapps "github.com/fnproject/fn_go/client/apps"
1717 "github.com/fnproject/fn_go/models"
1818 "github.com/fnproject/fn_go/provider"
You can’t perform that action at this time.
0 commit comments