fix linter errors

This commit is contained in:
2022-10-19 12:57:50 +02:00
parent baac74eb47
commit 90872e0c60
3 changed files with 8 additions and 8 deletions

View File

@@ -105,11 +105,11 @@ func Execute() {
rootCmd.PersistentFlags().BoolVarP(&modeflag.S, "shell", "S", false, "Enable shell mode output")
rootCmd.PersistentFlags().BoolVarP(&modeflag.Y, "yaml", "Y", false, "Enable yaml output")
rootCmd.MarkFlagsMutuallyExclusive("extended", "markdown", "orgtbl", "shell", "yaml")
rootCmd.Flags().MarkHidden("extended")
rootCmd.Flags().MarkHidden("orgtbl")
rootCmd.Flags().MarkHidden("markdown")
rootCmd.Flags().MarkHidden("shell")
rootCmd.Flags().MarkHidden("yaml")
_ = rootCmd.Flags().MarkHidden("extended")
_ = rootCmd.Flags().MarkHidden("orgtbl")
_ = rootCmd.Flags().MarkHidden("markdown")
_ = rootCmd.Flags().MarkHidden("shell")
_ = rootCmd.Flags().MarkHidden("yaml")
// same thing but more common, takes precedence over above group
rootCmd.PersistentFlags().StringVarP(&Outputmode, "output", "o", "ascii", "Output mode - one of: orgtbl, markdown, extended, shell, ascii(default)")

View File

@@ -24,7 +24,7 @@ import (
"testing"
)
func Testcontains(t *testing.T) {
func TestContains(t *testing.T) {
var tests = []struct {
list []int
search int

View File

@@ -90,8 +90,8 @@ func printOrgmodeData(w io.Writer, c cfg.Config, data *Tabdata) {
| cell | cell |
|------+------|
*/
leftR := regexp.MustCompile("(?m)^\\+")
rightR := regexp.MustCompile("\\+(?m)$")
leftR := regexp.MustCompile(`(?m)^\\+`)
rightR := regexp.MustCompile(`\\+(?m)$`)
output(w, color.Sprint(
colorizeData(c,