Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add go.mod #103

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module github.com/pressly/goose/v2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need /v2 ?

Does the consumer of this package need to reference "v2" in all import statements too?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there's no /v2 in the module name, vgo can use either tip of master or latest v1.. release. Yes, all the import statements will need this /v2, too.

When developers reach v2, semantic import versioning means that a /v2/ is added to the import path at the end of the module root prefix: my/thing/v2/sub/pkg. There are good reasons for this convention, as described in the earlier post, but it is still a departure from existing tools. Realizing this, vgo will not use any v2 or later tag in a source code repository without first checking that it has a go.mod with a module path declaration ending in that major version (for example, module "my/thing/v2"). Vgo uses that declaration as evidence that the author is using semantic import versioning to name packages within that module. This is especially important for multi-package modules, since the import paths within the module must contain the /v2/ element to avoid referring back to the v1 module.

-- https://research.swtch.com/vgo-module

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Goose don't have version tag eat. Please add tag v0.1.0 or v1.0.0 and use module module github.com/pressly/goose

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This repo has git tags. Latest is v2.3.0.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh. Sorry. Yes, vgo want major version in module.


require (
github.com/go-sql-driver/mysql v1.3.0
github.com/lib/pq v0.0.0-20180523031117-0677bdde3e15
github.com/mattn/go-sqlite3 v1.6.0
github.com/ziutek/mymysql v1.5.4
)