Conditions | 3 |
Total Lines | 21 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | package main |
||
12 | func main() { |
||
13 | var ipaddr string |
||
14 | flag.StringVar(&ipaddr, "ipaddr", "", "set target ip address") |
||
15 | flag.Parse() |
||
16 | |||
17 | conf := config.Config{ |
||
18 | AccountID: "", |
||
19 | LicenseKey: "", |
||
20 | Debug: true, |
||
21 | } |
||
22 | |||
23 | svc, err := minfraud.New(conf) |
||
24 | if err != nil { |
||
25 | panic(err) |
||
26 | } |
||
27 | |||
28 | resp, err := svc.ScoreByIP(ipaddr) |
||
29 | if err != nil { |
||
30 | panic(err) |
||
31 | } |
||
32 | fmt.Printf("[%+v]\n", resp) |
||
33 | } |
||
34 |