API for metadata about URLs on GOV.UK

go get


Metadata API

continuous integration status

A small HTTP application that acts as an easy way to get metadata about given URLs on GOV.UK.


Go 1.6.2


From within $GOPATH run make to run the tests and build a binary. Tests, build etc can also be run using the standard go build, go test...


Dependencies are vendored into vendor and have been committed so shouldn't need to be installed.

Use godep to add update dependencies and commit to source control as they are no longer installed during CI.

GOV.UK Development VM

The Dev VM now has a $GOPATH configured at /var/govuk/gopath so this app should be checked out into /var/govuk/gopath/src/ for the go commands and make etc to function correctly.

Avoid trying to symlink the directory into the $GOPATH either within the VM or on the host as this causes issues with dependencies in vendor. Working with the same directory structure on the host and allowing NFS to mount that into the VM works well.

For convenience using somthing like direnv to set up a local $GOPATH when you cd into the root of the repository keeps parity between the host and VM.


export GOPATH=<path to parent gopath dir>
export PATH=$GOPATH/bin:$PATH

within .envrc in the metadata-api root.


Configuration can be handled using ENV variables that get passed into the process.