From a09c15f36cc4b5edf0ada61e9bd7dfc9f8d6cd27 Mon Sep 17 00:00:00 2001 From: Valentin Kiselev Date: Fri, 19 Jan 2024 10:57:24 +0300 Subject: [PATCH] chore: add a commend and remove odd spaces --- internal/config/command.go | 8 ++++---- internal/lefthook/run.go | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/internal/config/command.go b/internal/config/command.go index d0bae668..79a70f2e 100644 --- a/internal/config/command.go +++ b/internal/config/command.go @@ -25,10 +25,10 @@ type Command struct { Exclude string `mapstructure:"exclude" yaml:",omitempty" json:"exclude,omitempty" toml:"exclude,omitempty"` Priority int `mapstructure:"priority" yaml:",omitempty" json:"priority,omitempty" toml:"priority,omitempty"` - FailText string `mapstructure:"fail_text" yaml:"fail_text,omitempty" json:"fail_text,omitempty" toml:"fail_text,omitempty"` - Interactive bool `mapstructure:"interactive" yaml:",omitempty" json:"interactive,omitempty" toml:"interactive,omitempty"` - UseStdin bool `mapstructure:"use_stdin" yaml:",omitempty" json:"use_stdin,omitempty" toml:"use_stdin,omitempty"` - StageFixed bool `mapstructure:"stage_fixed" yaml:"stage_fixed,omitempty" json:"stage_fixed,omitempty" toml:"stage_fixed,omitempty"` + FailText string `mapstructure:"fail_text" yaml:"fail_text,omitempty" json:"fail_text,omitempty" toml:"fail_text,omitempty"` + Interactive bool `mapstructure:"interactive" yaml:",omitempty" json:"interactive,omitempty" toml:"interactive,omitempty"` + UseStdin bool `mapstructure:"use_stdin" yaml:",omitempty" json:"use_stdin,omitempty" toml:"use_stdin,omitempty"` + StageFixed bool `mapstructure:"stage_fixed" yaml:"stage_fixed,omitempty" json:"stage_fixed,omitempty" toml:"stage_fixed,omitempty"` } func (c Command) Validate() error { diff --git a/internal/lefthook/run.go b/internal/lefthook/run.go index 2070bec0..dd2094e6 100644 --- a/internal/lefthook/run.go +++ b/internal/lefthook/run.go @@ -246,6 +246,7 @@ func printSummary( } } +// parseFilesFromString parses both `\0`- and `\n`-separated files. func parseFilesFromString(paths string) []string { var result []string start := 0