+
Skip to content
This repository was archived by the owner on Sep 28, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,22 @@ jobs:
- run:
name: Linting
command: |
go fmt ./...
git diff --exit-code
go get -u golang.org/x/lint/golint
golint -set_exit_status
# golint adds stuff to go.mod and go.sum that mess
# with git status --porcelain later
git checkout go.mod go.sum
- run:
name: Test
command: go test -v -race ./...
- run:
name: Check if documentation needs to be updated
command: |
rm docs/*.md
./corectl generate-docs
git diff --exit-code --name-only docs/*.md
if [[ ! -z $(git status --porcelain) ]]; then exit 1; fi
- run:
name: Check if changes has been done to the CLI API
command: |
Expand Down
44 changes: 0 additions & 44 deletions docs/corectl_bookmark_set.md

This file was deleted.

145 changes: 0 additions & 145 deletions docs/corectl_config.md

This file was deleted.

1 change: 0 additions & 1 deletion internal/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ func ReadCertificates(certificatesPath string) *tls.Config {
return tlsConfig
}


// AddValidProp adds the given property to the set of valid properties.
func AddValidProp(propName string) {
validProps[propName] = struct{}{}
Expand Down
1 change: 1 addition & 0 deletions internal/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/stretchr/testify/assert"
"gopkg.in/yaml.v2"
)

var source = []byte(`test: ${_TEST1_}
nested:
nest2:
Expand Down
2 changes: 1 addition & 1 deletion internal/modeldata.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"net/http"
neturl "net/url"

"github.com/qlik-oss/enigma-go"
"github.com/qlik-oss/corectl/internal/rest"
"github.com/qlik-oss/enigma-go"
)

// ModelMetadata defines all available metadata around the data model.
Expand Down
8 changes: 4 additions & 4 deletions internal/rest/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"crypto/tls"
"encoding/json"
"fmt"
"os"
neturl "net/url"
"net/http"
neturl "net/url"
"os"
)

// ImportApp imports a local app into the engine using the rest api
Expand All @@ -28,9 +28,9 @@ func ImportApp(appPath string, engine *neturl.URL, headers http.Header, certs *t
defer file.Close()
req := &http.Request{
Method: "POST",
URL: url,
URL: url,
Header: headers,
Body: file,
Body: file,
}
appInfo := &RestNxApp{}
statusCodes := &map[int]bool{
Expand Down
2 changes: 1 addition & 1 deletion internal/rest/caller.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ func Call(req *http.Request, certs *tls.Config, result interface{}, statusCodes
// Removes path and query escapes an app id.
func adaptAppID(appID string) string {
split := strings.Split(appID, "/")
adaptedID := split[len(split) - 1]
adaptedID := split[len(split)-1]
return neturl.QueryEscape(adaptedID)
}
2 changes: 1 addition & 1 deletion internal/rest/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func ReadRestMetadata(appID string, engine *neturl.URL, headers http.Header, cer
url.Path = fmt.Sprintf("/v1/apps/%s/data/metadata", adaptAppID(appID))
req := &http.Request{
Method: "GET",
URL: url,
URL: url,
Header: headers,
}
result := &RestMetadata{}
Expand Down
3 changes: 1 addition & 2 deletions internal/urlparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/spf13/viper"
)

func GetEngineURL() (*url.URL) {
func GetEngineURL() *url.URL {
engine := viper.GetString("engine")
if engine == "" {
FatalError("engine URL not specified")
Expand Down Expand Up @@ -86,7 +86,6 @@ func parseEngineURL(engine string) (*url.URL, error) {
return u, nil
}


func buildWebSocketURL(ttl string) string {
u := GetEngineURL()
// Only modify the URL path if there is no path set
Expand Down
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载