docs: readme

pull/8/head
Raphaël 2020-06-08 11:00:54 +02:00 committed by GitHub
parent 87ddaaf729
commit 01efe29882
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 44 additions and 21 deletions

View File

@ -53,29 +53,46 @@ func main() {
#### Operators #### Operators
```go ```go
dork.Site("facebook.com").Or().Site("twitter.com").ToString() package main
// returns: site:facebook.com OR site:twitter.com
dork.Intext("facebook").And().Intext("twitter").ToString() import "github.com/sundowndev/dorkgen"
// returns: intext:"facebook" AND intext:"twitter"
func main() {
dork.Site("facebook.com").Or().Site("twitter.com").ToString()
// returns: site:facebook.com OR site:twitter.com
dork.Intext("facebook").And().Intext("twitter").ToString()
// returns: intext:"facebook" AND intext:"twitter"
}
``` ```
#### Exclude results #### Exclude results
```go ```go
dork. package main
Exclude((&dorkgen.GoogleSearch{}).
Site("example.com"). import "github.com/sundowndev/dorkgen"
ToString()).
Site("example.*"). func main() {
Or(). dork.
Intext("text") Exclude((&dorkgen.GoogleSearch{}).
// returns: -site:example.com site:example.* OR "text" Site("example.com").
ToString()).
Site("example.*").
Or().
Intext("text")
// returns: -site:example.com site:example.* OR "text"
}
``` ```
#### Group tags along with operators #### Group tags along with operators
```go ```go
package main
import "github.com/sundowndev/dorkgen"
func main() {
dork. dork.
Group((&dorkgen.GoogleSearch{}). Group((&dorkgen.GoogleSearch{}).
Site("facebook.com"). Site("facebook.com").
@ -91,16 +108,22 @@ dork.
#### URL conversion #### URL conversion
```go ```go
dork. package main
Site("facebook.*").
Exclude((&dorkgen.GoogleSearch{}).
Site("facebook.com").
ToString())
dork.ToString() import "github.com/sundowndev/dorkgen"
// returns: site:facebook.* -site:facebook.com
dork.ToURL() func main() {
// returns: https://www.google.com/search?q=site%3Afacebook.%2A+-site%3Afacebook.com dork.
Site("facebook.*").
Exclude((&dorkgen.GoogleSearch{}).
Site("facebook.com").
ToString())
dork.ToString()
// returns: site:facebook.* -site:facebook.com
dork.ToURL()
// returns: https://www.google.com/search?q=site%3Afacebook.%2A+-site%3Afacebook.com
}
``` ```
## Support ## Support