Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Delphier committed Mar 13, 2020
1 parent a52c093 commit f77bf57
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,16 @@ if err := ipip.Open("./ipipfree.ipdb"); err != nil {
// or
// ipip.FatalOpen("./ipipfree.ipdb")

fmt.Println(ipip.Get("118.28.8.8")) // Output: 天津
fmt.Println(ipip.Get("118.28.8.8")) // Output: 天津
fmt.Println(ipip.Get("211.143.12.218")) // Output: 湖南 邵阳
fmt.Println(ipip.Get("67.230.161.196")) // Output: 美国
fmt.Println(ipip.Get("::1")) // Output:
```

## Example: free API
```golang
fmt.Println(ipip.APIGet("118.28.8.8")) // Output: 天津
fmt.Println(ipip.APIGet("211.143.12.218")) // Output: 湖南 邵阳
fmt.Println(ipip.APIGet("67.230.161.196")) // Output: 美国 加利福尼亚州 洛杉矶
fmt.Println(ipip.APIGet("::1")) // Output: 保留地址
```

0 comments on commit f77bf57

Please sign in to comment.