Skip to content

Instantly share code, notes, and snippets.

@satta
Created June 7, 2021 14:14
Show Gist options
  • Save satta/a19397fd91ce182df7570efbd2a14b92 to your computer and use it in GitHub Desktop.
Save satta/a19397fd91ce182df7570efbd2a14b92 to your computer and use it in GitHub Desktop.
package main
import (
"bufio"
"fmt"
"log"
"os"
"github.com/google/gonids"
)
func main() {
scanner := bufio.NewScanner(os.Stdin)
for scanner.Scan() {
line := scanner.Text()
if _, err := gonids.ParseRule(line); err != nil {
fmt.Println(line, " : ", err)
}
}
if err := scanner.Err(); err != nil {
log.Println(err)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment