diff --git a/cmd/root.go b/cmd/root.go index 764cab0..ec5a73a 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -29,7 +29,7 @@ var ( verbose bool ) -// This represents the base command when called without any subcommands +// RootCmd represents the base command when called without any subcommands var RootCmd = &cobra.Command{ Use: "ponder", Short: "A managing tool for lilypond sheet music libraries", diff --git a/compiler/book.go b/compiler/book.go index 7efd688..79328fb 100644 --- a/compiler/book.go +++ b/compiler/book.go @@ -73,7 +73,7 @@ func MakeBook(path string, opts *settings.Settings) { CompileDir(path, opts) // Compile the book template var templ = template.Must(template.New("songBook").Funcs(template.FuncMap{ - "in": helpers.InSlice, + "in": helpers.InSlice, "unknown": unknownCategories, }).Parse(bookTempl)) @@ -136,10 +136,10 @@ func scoreCategories(scores *[]settings.Score) []string { // unknownCategories returns true if the slice contains any scores with // unknown categories func unknownCategories(scores *[]settings.Score) bool { - for i := range *scores { - if len((*scores)[i].Categories) == 0 { - return true - } - } - return false + for i := range *scores { + if len((*scores)[i].Categories) == 0 { + return true + } + } + return false } diff --git a/compiler/compile.go b/compiler/compile.go index a003e15..dff2404 100644 --- a/compiler/compile.go +++ b/compiler/compile.go @@ -45,7 +45,7 @@ func CompileDir(path string, opts *settings.Settings) { msg string err error ) - switch filepath.Ext(scores[i].Path){ + switch filepath.Ext(scores[i].Path) { case ".ly": msg, err = Lilypond(scores[i].Path) case ".pdf": @@ -62,7 +62,7 @@ func CompileDir(path string, opts *settings.Settings) { } else { log.WithFields(log.Fields{ "score": scores[i], - }).Debug("skipping compilation") + }).Debug("skipping compilation") } } } diff --git a/helpers/template_checks.go b/helpers/template_checks.go index 648efbc..ff0ac4f 100644 --- a/helpers/template_checks.go +++ b/helpers/template_checks.go @@ -16,10 +16,10 @@ package helpers // InSlice returns true if one of the elements in the slice a equals s func InSlice(s string, a []string) bool { - for i := range a { - if a[i] == s { - return true - } - } - return false + for i := range a { + if a[i] == s { + return true + } + } + return false } diff --git a/settings/score.go b/settings/score.go index 57c13f0..ebd5e90 100644 --- a/settings/score.go +++ b/settings/score.go @@ -30,8 +30,8 @@ type Score struct { Name string // The name of the score in the songbook Categories []string `json:",omitempty"` // Categories to which the scores belong Path string // The path to the scores (uncompiled) file - LastModified time.Time `json:"-"` // Time when the score source was last modified (will be set internally) - OutputPath string `json:",omitempty"` // The path on which the compiled version of the score will be placed + LastModified time.Time `json:"-"` // Time when the score source was last modified (will be set internally) + OutputPath string `json:",omitempty"` // The path on which the compiled version of the score will be placed } // FromJSON reads the settings of a score from a JSON file