address-parser

command module
v0.0.0-...-a65658d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2021 License: MIT Imports: 7 Imported by: 0

README

address-parser

Golang HTTP service wrapping libpostal to provide address segment detection. Libpostal is not bundled, it needs to be installed prior to building the project. Please consult libpostal's documentation for setup instructions. This project's GH Action workflow and Dockerfile might also provide some insights.

Prepare

Tested with Go v1.17 on Linux and MacOS.

go mod tidy

If libpostal is installed to a non-default path PKG_CONFIG_PATH and LD_LIBRARY_PATH need to be adjusted accordingly:

# LIBPOSTAL_HOME should point to the installation folder
export PKG_CONFIG_PATH=$LIBPOSTAL_HOME/lib/pkgconfig
export LD_LIBRARY_PATH=$LIBPOSTAL_HOME/lib

Build

Local
go generate ./...
# generates *.gen.go files in ./api
go build
Docker
docker build -t address-parser .

Test

go test ./...

Run

./address-parser

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL