-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathmain.go
More file actions
36 lines (32 loc) · 849 Bytes
/
main.go
File metadata and controls
36 lines (32 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package main
import (
"fmt"
"os"
"strings"
cmd "github.com/meshery-extensions/helm-kanvas-snapshot/cmd/kanvas-snapshot"
)
var (
providerToken string
mesheryCloudAPIBaseURL string
mesheryAPIBaseURL string
workflowAccessToken string
)
func main() {
params := map[string]string{
"providerToken": providerToken,
"mesheryCloudAPIBaseURL": mesheryCloudAPIBaseURL,
"mesheryAPIBaseURL": mesheryAPIBaseURL,
"workflowAccessToken": workflowAccessToken,
}
missing := []string{}
for name, value := range params {
if value == "" {
missing = append(missing, name)
}
}
if len(missing) > 0 {
fmt.Fprintf(os.Stderr, "Error: Missing required parameter(s): %s\n", strings.Join(missing, ", "))
os.Exit(1)
}
cmd.Main(providerToken, mesheryCloudAPIBaseURL, mesheryAPIBaseURL, workflowAccessToken)
}