Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yingzhuo/regioncn-golang-client


https://github.com/yingzhuo/regioncn-golang-client

Last synced: 25 days ago
JSON representation

Awesome Lists containing this project

README

        

# regioncn-golang-client

### 安装

```
go get github.com/yingzhuo/regioncn-golang-client
```

### 使用例

```golang
package main

import (
"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)
}
}

```