From 5966f079de894d4df6454d10e6805a43c594f0e6 Mon Sep 17 00:00:00 2001 From: Kevin Klopfenstein Date: Wed, 8 Jul 2020 19:21:39 +0200 Subject: [PATCH] update pipelines Signed-off-by: Kevin Klopfenstein --- .github/workflows/go.yml | 9 +++++++-- go.mod | 3 +++ pkg/fmcClient/networks.go | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 go.mod diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 53e67ad..9e29c29 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -33,16 +33,21 @@ jobs: fi - name: Build - run: go build -v . + run: | + go build -v cmd/fmcCLI + go build -v pkg/fmcClient - name: Test - run: go test -v . + run: | + go test -v cmd/fmcCLI + go test -v pkg/fmcClient - name: go-crossbuild uses: izumin5210/action-go-crossbuild@v1.0.0 with: # An application name name: fmcCLI + package: ./cmd/fmcCLI # Space or comma separated list of GOARCH - uses: softprops/action-gh-release@v1 with: diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..80267da --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/kubernetli/fmcClient + +go 1.14 diff --git a/pkg/fmcClient/networks.go b/pkg/fmcClient/networks.go index f80ff2b..4b4ff00 100644 --- a/pkg/fmcClient/networks.go +++ b/pkg/fmcClient/networks.go @@ -53,6 +53,7 @@ type CreateNetworkInput struct { ID string `json:"id"` } +// UpdateNetworkOutput output format . type UpdateNetworkOutput struct { Links struct { Self string `json:"self"` @@ -154,6 +155,7 @@ func (c *Client) UpdateNetworks(i CreateNetworkInput) (*UpdateNetworkOutput, err } req.Body = ioutil.NopCloser(bytes.NewReader(t)) res := UpdateNetworkOutput{} + // create Pointer for Network Struct err = c.sendRequest(req, &res) if err != nil {