mirror of
https://github.com/sundowndev/phoneinfoga.git
synced 2026-11-04 12:04:37 +00:00
docs: go module usage
This commit is contained in:
1 parent
1abea84433
commit
4609b37fbd
1 file changed
+16
-3
+16
-3
@@ -2,6 +2,14 @@
|
||||
|
||||
You can easily use scanners in your own Golang script. You can find [Go documentation here](https://godoc.org/github.com/sundowndev/PhoneInfoga).
|
||||
|
||||
### Install the module
|
||||
|
||||
```
|
||||
go get -v gopkg.in/sundowndev/phoneinfoga.v2
|
||||
```
|
||||
|
||||
### Usage example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
@@ -9,16 +17,21 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
phoneinfoga "github.com/sundowndev/phoneinfoga/pkg/scanners"
|
||||
phoneinfoga "gopkg.in/sundowndev/phoneinfoga.v2/pkg/scanners"
|
||||
)
|
||||
|
||||
func main() {
|
||||
number, err := phoneinfoga.LocalScan(number)
|
||||
number, err := phoneinfoga.LocalScan("<number>")
|
||||
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
fmt.Println(number.E164)
|
||||
links := phoneinfoga.GoogleSearchScan(number)
|
||||
|
||||
for _, link := range links.Individuals {
|
||||
fmt.Println(link.URL) // Google search link to scan
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
Reference in new issue
Block a user