Skip to content
This repository was archived by the owner on Jun 12, 2024. It is now read-only.
This repository was archived by the owner on Jun 12, 2024. It is now read-only.

Go Modules support #934

@nicmr

Description

@nicmr

Hi, I'm currently working on updating draft to work with go modules.
This is the current progress:

  • Building and running draft outside the gopath

Following the official documentation, I went through the following process:

# clone outside GOPATH
$ git clone https://github.com/Azure/draft
$ cd draft
$ go mod init github.com/Azure/draft

go mod will then copy the dependency requirements from the existing Gopkg.lock.

$ go mod tidy

to clean up the dependencies , add missing ones and mark indirect dependencies.
The results are this go.mod and this go.sum.

Now I can build and run draft outside the gopath.

$ go build ./...
$ go run ./cmd/draft

(I previously mentioned some dependency issues here but it turns out these were based on wrong assumptions - I thought I was already importing my fork with modules support but I was actually importing the remote version.) For documentation purposes I've stored them here)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions