Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yingzhuo/regioncn-golang-client
https://github.com/yingzhuo/regioncn-golang-client
Last synced: 25 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/yingzhuo/regioncn-golang-client
- Owner: yingzhuo
- License: apache-2.0
- Created: 2019-10-15T23:22:01.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-15T23:56:23.000Z (about 5 years ago)
- Last Synced: 2024-06-20T06:22:01.361Z (5 months ago)
- Language: Go
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# regioncn-golang-client
### 安装
```
go get github.com/yingzhuo/regioncn-golang-client
```### 使用例
```golang
package mainimport (
"fmt"
cli "github.com/yingzhuo/regioncn-golang-client"
)func main() {
client := cli.NewProtobufClient("localhost", 8080)for _, v := range client.GetAllProvince() {
fmt.Println(v)
}for _, v := range client.GetCityByProvinceCode("430000") {
fmt.Println(v)
}for _, v := range client.GetAreaByCityCode("430100") {
fmt.Println(v)
}for _, v := range client.GetStreetByAreaCode("430102") {
fmt.Println(v)
}
}```