Skip to content

Commit

Permalink
docs(cmd): Add Default Case Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jshlbrd committed Nov 27, 2024
1 parent 313cbbe commit a708860
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/substation/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ func testFile(arg string, extVars map[string]string) error {
fileName := filepath.Base(arg)
_ = os.Chdir(filepath.Dir(arg))

// The default case is a no-op -- the file is skipped because
// it cannot be tested.
switch filepath.Ext(fileName) {
case ".jsonnet", ".libsonnet":
// If the Jsonnet cannot compile, then the file is invalid.
Expand Down
2 changes: 2 additions & 0 deletions cmd/substation/vet.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ func vetFile(arg string, extVars map[string]string) error {
fileName := filepath.Base(arg)
_ = os.Chdir(filepath.Dir(arg))

// The default case is a no-op -- the file is skipped because
// it cannot be vetted.
switch filepath.Ext(fileName) {
case ".jsonnet", ".libsonnet":
mem, err := compileFile(fileName, extVars)
Expand Down

0 comments on commit a708860

Please sign in to comment.