Skip to content

Commit

Permalink
remove comments
Browse files Browse the repository at this point in the history
Signed-off-by: Stephanie <[email protected]>
  • Loading branch information
yangcao77 committed Jul 28, 2023
1 parent 90dc643 commit ef6c0b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"mode": "auto",
"program": "${workspaceFolder}/main.go",
"cwd": "${workspaceFolder}",
},
}
]
}
13 changes: 1 addition & 12 deletions cdq-analysis/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ import (
"fmt"
"log"
"os"
"strconv"
"strings"

"go.uber.org/zap/zapcore"
ctrl "sigs.k8s.io/controller-runtime"
Expand All @@ -33,23 +31,14 @@ import (
)

func main() {
// remove the prefix and suffix quotes
for i := 1; i <= 10; i++ {
if strings.HasPrefix(os.Args[i], "\"") && strings.HasSuffix(os.Args[i], "\"") && len(os.Args[i]) > 1 {
os.Args[i] = os.Args[i][1 : len(os.Args[i])-1]
}
}
// gitToken := os.Args[1]
isDevfilePresent, _ := strconv.ParseBool(os.Args[10])
isDockerfilePresent, _ := strconv.ParseBool(os.Args[11])
createK8sJob, _ := strconv.ParseBool(os.Args[12])
if os.Getenv("GITHUB_TOKEN") == "" {
log.Fatal("GITHUB_TOKEN must be set as an environment variable")
}
gitToken := os.Getenv("GITHUB_TOKEN")

// Parse all of the possible command-line flags for the tool
var contextPath, URL, name, devfilePath, dockerfilePath, Revision, namespace, DevfileRegistryURL string
var isDevfilePresent, isDockerfilePresent, createK8sJob bool
flag.StringVar(&name, "name", "", "The ComponentDetectionQuery name")
flag.StringVar(&contextPath, "contextPath", "./", "The context path for the cdq analysis")
flag.StringVar(&URL, "URL", "", "The URL for the git repository")
Expand Down

0 comments on commit ef6c0b2

Please sign in to comment.