package wechat import ( "github.com/kayon/iploc" "testing" ) func Test_CreateRefund(t *testing.T) { wx_mch_apiclient_key := "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDsea/umgdNz68w\nBdISLMPg+5E5Od2EDblO0ifz60P92kyIIQgFMKnw7sawfYlQNMs7fTOKMUBFoSJH\nzUNdOXUxLTmvPg9Pnh2jBBDQkUqBCMvUSsk5WzqF2VTSAmESy2XnfbGrXz9Q4KhV\nsLwP9O0qFDCrxgqjhKStUew6wNBq03lPnyvOee7QQ3eBZYY2z98XXjHai4nH7Lwi\nzwfYN23P/1QjWcs7a+J53v9KXjlEofNQzoXKy0hJnkPySTF8J9V7vBkbNwRceDVD\ng/uCsZ+ZBYEqwVtu7TkBaFZS06/y8/9iGNyvVLTBOzyX5XTxMAjSctRKuHEkzTII\n4ikNGtxbAgMBAAECggEAG8ez3lDj+MUkLH0Sj6YIoN6M0e81UbUXBuZzYRlLVIAX\nq4pN2eY8oJw8ZTFqNyzsjyGHM33Tshpa35qChmoglVVdyHN+8vh9PNBWdVoMKZpx\n74+VkhJgjqbYaw9yffW9E/PVMm+vDX5G6EIp5an9TosuqI9MYqdLfTz5hnFuSo4x\ngZvJmQZ/NytYjUDUOKejHjMFcfb9oBJpMDD+cOpqbK8DI9t+a4WWFxgX25TsgtzY\n9Dwnx/H4gXoDBU5nayZ5aQ1EXwNcH6s+XbAYQUpneWyjdsmg5mCuIRf/DaC0amAx\ncyGU74YJA1/eapD+TJsrNmboMdXFBUVsdwGrlF1IMQKBgQD/bUiCdYKKMC5DKidB\nrT6YqJC3lDoSbAQw/vhOy6xP1zegJdX3irlFweKCEzhRTlStV7C/vBe7eylz303Q\nUS6T59piEtKLlSJNxiPTWH0Gr+KGdJJgXa/fZPL0OEEDE7ScDrbGtAPrKLCM+Nx1\nXHujy/g2i1hbKuD82wWFidcfwwKBgQDtAYSslD/43qSGngWom2UPCr7b5nlhk9Xh\nihztl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704001", wx_mch_apiclient_key, wx_pay_cert, "4642B326DDDDEAC74C677C163FB82BC95DCE43C0", "中餐", "122331", "yuanyin", "https://ttl-mini.tetele.net/admin/user/user/ttt_refund") t.Log(ret) t.Log(err) } func Test_Qqwry(t *testing.T) { loc, err := iploc.Open("qqwry.dat") if err != nil { panic(err) } detail := loc.Find("219.131.197.178") t.Log(detail.String()) t.Log(detail.Country, detail.Province, detail.City, detail.County) }