Skip to content

dingdayu/phonedata

Repository files navigation

phonedata

note: data from network, please use after identification.

Build Status Code maintainability code coverage Windows Build Status Author GoDoc Report

install

go get -u github.com/dingdayu/phonedata

example

package main

import (
	"fmt"
	"github.com/dingdayu/phonedata"
)

func main() {
	info, _ := phonedata.Find("13298181006")
	fmt.Println(info)
}

at go 1.12, go models

file: example/main.go

benchmark

go test -v -bench=".*" -benchmem -memprofile memprofile.out -cpuprofile cpuprofile.out
=== RUN   TestIsPhone
--- PASS: TestIsPhone (0.00s)
=== RUN   TestTotalRecord
--- PASS: TestTotalRecord (0.00s)
=== RUN   TestVersion
--- PASS: TestVersion (0.00s)
=== RUN   TestLoadDataFile
--- PASS: TestLoadDataFile (0.00s)
=== RUN   Example
--- PASS: Example (0.00s)
goos: darwin
goarch: amd64
pkg: phonedata
BenchmarkIsPhone-4        200000             13505 ns/op            9209 B/op        114 allocs/op
BenchmarkVersion-4      300000000                5.21 ns/op            0 B/op          0 allocs/op
BenchmarkFind-4          3000000               449 ns/op             224 B/op          6 allocs/op
PASS
ok      phonedata       6.922s

at: MacBook Pro(Intel Core i7/3.1 GHz)

Reference

The project is affected by the following projects or articles.

About

内地手机号码归属

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published