Skip to content

Commit

Permalink
fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
ugol committed Feb 13, 2024
1 parent 81b0f10 commit 65f9c69
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/cmd/templateShow.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,21 @@ var templateShowCmd = &cobra.Command{
os.Exit(1)
}

nocolor, _ := cmd.Flags().GetBool("nocolor")
noColor, _ := cmd.Flags().GetBool("nocolor")
templateDir := os.ExpandEnv(fmt.Sprintf("%s/%s", constants.JRhome, "templates"))
templatePath := fmt.Sprintf("%s/%s.tpl", templateDir, args[0])
templateScript, err := os.ReadFile(templatePath)
if err != nil {
log.Fatalf("Failed to ReadFile: %s", err)
}
log.Fatalf("Failed to ReadFile: %s", err)
}
valid, err := isValidTemplate([]byte(templateScript))
if err != nil {
log.Fatalf("Failed to read a template: %s", err)
}
log.Fatalf("Failed to read a template: %s", err)
}
templateString := string(templateScript)

var Reset = "\033[0m"
if runtime.GOOS != "windows" && !nocolor {
if runtime.GOOS != "windows" && !noColor {
var Cyan = "\033[36m"
coloredOpeningBracket := fmt.Sprintf("%s%s", Cyan, "{{")
coloredClosingBracket := fmt.Sprintf("%s%s", "}}", Reset)
Expand Down

0 comments on commit 65f9c69

Please sign in to comment.