godict is a simple library that generates string patterns based on dictionary.
Go 1.15
go get github.com/hlts2/godict
package main
import (
"context"
"log"
"github.com/hlts2/godict"
)
func main() {
dict, err := godict.New()
if err != nil {
log.Fatal(err)
}
log.Println("start to search pattern: 3dmax")
err = dict.Do(context.Background(), func(pattern string) {
if pattern == "3dmax" {
log.Printf("find: %s\n", pattern)
}
})
if err != nil {
log.Fatal(err)
}
}
- Fork it ( https://github.com/hlts2/godict/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request