files=( $(find . -name '*.go' -not -path './vendor/*') ) for rule in \ 's|"github.com/docker/docker/api|"docker.io/go-docker/api|' \ 's|^([[:space:]]+)"github.com/docker/docker/client|\1client "docker.io/go-docker|' \ 's|"github.com/docker/docker/client|"docker.io/go-docker|' \ ; do sed -i -E "$rule" ${files[*]} done