Skip to content

Commit bda863d

Browse files
committed
Move stack package to go-sdk
The stack package moved to go-sdk for lightweight imports for clients and programs that need to load/parse stack.yaml into memory. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent ee4db09 commit bda863d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+86
-636
lines changed

builder/build.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ import (
2121

2222
v2execute "github.com/alexellis/go-execute/v2"
2323
"github.com/openfaas/faas-cli/schema"
24-
"github.com/openfaas/faas-cli/stack"
2524
vcs "github.com/openfaas/faas-cli/versioncontrol"
2625
"github.com/openfaas/go-sdk/builder"
26+
"github.com/openfaas/go-sdk/stack"
2727
)
2828

2929
// AdditionalPackageBuildArg holds the special build-arg keyname for use with build-opts.

builder/build_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"strings"
88
"testing"
99

10-
"github.com/openfaas/faas-cli/stack"
10+
"github.com/openfaas/go-sdk/stack"
1111
)
1212

1313
func Test_getDockerBuildCommand_NoOpts(t *testing.T) {

builder/copy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func copyFile(src, dest string) error {
8484

8585
_, err = io.Copy(f, s)
8686
if err != nil {
87-
return fmt.Errorf("Error copying dest file: %s\n" + err.Error())
87+
return fmt.Errorf("Error copying dest file: %s", err.Error())
8888
}
8989

9090
return nil

builder/publish.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import (
1616

1717
v2execute "github.com/alexellis/go-execute/v2"
1818
"github.com/openfaas/faas-cli/schema"
19-
"github.com/openfaas/faas-cli/stack"
2019
"github.com/openfaas/go-sdk/builder"
20+
"github.com/openfaas/go-sdk/stack"
2121
)
2222

2323
// PublishImage will publish images as multi-arch

commands/build.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import (
1313
"github.com/morikuni/aec"
1414
"github.com/openfaas/faas-cli/builder"
1515
"github.com/openfaas/faas-cli/schema"
16-
"github.com/openfaas/faas-cli/stack"
1716
"github.com/openfaas/faas-cli/util"
17+
"github.com/openfaas/go-sdk/stack"
1818

1919
"github.com/openfaas/faas-cli/versioncontrol"
2020
"github.com/spf13/cobra"

commands/deploy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import (
1414
"github.com/openfaas/faas-cli/builder"
1515
"github.com/openfaas/faas-cli/proxy"
1616
"github.com/openfaas/faas-cli/schema"
17-
"github.com/openfaas/faas-cli/stack"
1817
"github.com/openfaas/faas-cli/util"
18+
"github.com/openfaas/go-sdk/stack"
1919

2020
"github.com/spf13/cobra"
2121
yaml "gopkg.in/yaml.v3"
@@ -492,7 +492,7 @@ func deployFailed(status map[string]int) error {
492492
err := fmt.Errorf("function '%s' failed to deploy with status code: %d", funcName, funcStatus)
493493
allErrors = append(allErrors, err.Error())
494494
}
495-
return fmt.Errorf(strings.Join(allErrors, "\n"))
495+
return fmt.Errorf("%s", strings.Join(allErrors, "\n"))
496496
}
497497

498498
func badStatusCode(statusCode int) bool {

commands/describe.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import (
1616

1717
"github.com/openfaas/faas-cli/proxy"
1818
"github.com/openfaas/faas-cli/schema"
19-
"github.com/openfaas/faas-cli/stack"
2019
"github.com/openfaas/faas-provider/types"
20+
"github.com/openfaas/go-sdk/stack"
2121

2222
"github.com/spf13/cobra"
2323
)

commands/faas.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import (
1515
"syscall"
1616

1717
"github.com/moby/term"
18-
"github.com/openfaas/faas-cli/stack"
1918
"github.com/openfaas/faas-cli/version"
19+
"github.com/openfaas/go-sdk/stack"
2020
"github.com/spf13/cobra"
2121
)
2222

commands/generate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import (
1616
"github.com/openfaas/faas-cli/schema"
1717
knativev1 "github.com/openfaas/faas-cli/schema/knative/v1"
1818
openfaasv1 "github.com/openfaas/faas-cli/schema/openfaas/v1"
19-
"github.com/openfaas/faas-cli/stack"
2019
"github.com/openfaas/faas-cli/util"
20+
"github.com/openfaas/go-sdk/stack"
2121
"github.com/pkg/errors"
2222
"github.com/spf13/cobra"
2323

commands/generate_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
"github.com/openfaas/faas-cli/schema"
1111

12-
"github.com/openfaas/faas-cli/stack"
12+
"github.com/openfaas/go-sdk/stack"
1313
)
1414

1515
var generateTestcases = []struct {

0 commit comments

Comments
 (0)