Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( KeyWords = []string{} Insensitive = false )
View Source
var Filter = &cobra.Command{ Use: "filter", Short: "filters data from input using keywords", Long: "filters out lines that contains any of the given keyword.Note filter does not support clipboard input", RunE: func(cmd *cobra.Command, args []string) error { scanner := asynchronousInput() if scanner == nil { log.Fatal("no input provided") } data := internal.ReadFromFile(wordFile) KeyWords = append(KeyWords, strings.Split(data, "\n")...) if len(KeyWords) == 0 { log.Fatal("filter keywords not provided") } for scanner.Scan() { line := scanner.Text() if !FilterLine(line) { fmt.Println(line) } } return nil }, }
Functions ¶
func InterpretString ¶
Converts a raw string to interpreted string
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.