Skip to content

Commit

Permalink
Remove "relative" imports
Browse files Browse the repository at this point in the history
This commit reverts changes made in a previous PR [1] which attempted to
use relative imports within the module. I'm quite new to go modules and
unfortunately that change was equivalent to renaming the module -
something that golang doesn't support.[2] This commit reverts the
changes and adds warnings to previous releases that were published in
error.

[1]: e05c9d2
[2]: golang/go#26904
  • Loading branch information
kohrVid committed May 17, 2022
1 parent dab0400 commit 337975e
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 12 deletions.
2 changes: 1 addition & 1 deletion cmd/clean.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package cmd
import (
"fmt"

"pg-cli/db"
"github.com/kohrVid/pg-cli/db"

"github.com/spf13/cobra"
"github.com/spf13/viper"
Expand Down
2 changes: 1 addition & 1 deletion cmd/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package cmd
import (
"fmt"

"pg-cli/db"
"github.com/kohrVid/pg-cli/db"

_ "github.com/lib/pq"
"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion cmd/down.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package cmd
import (
"fmt"

"pg-cli/db"
"github.com/kohrVid/pg-cli/db"

_ "github.com/golang-migrate/migrate/v4/database/postgres"
_ "github.com/golang-migrate/migrate/v4/source/file"
Expand Down
2 changes: 1 addition & 1 deletion cmd/drop.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package cmd
import (
"fmt"

"pg-cli/db"
"github.com/kohrVid/pg-cli/db"

"github.com/spf13/cobra"
"github.com/spf13/viper"
Expand Down
2 changes: 1 addition & 1 deletion cmd/migrate_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package cmd
import (
"fmt"

"pg-cli/db"
"github.com/kohrVid/pg-cli/db"

_ "github.com/golang-migrate/migrate/v4/database/postgres"
_ "github.com/golang-migrate/migrate/v4/source/file"
Expand Down
2 changes: 1 addition & 1 deletion cmd/seed.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package cmd
import (
"fmt"

"pg-cli/db"
"github.com/kohrVid/pg-cli/db"

"github.com/spf13/cobra"
"github.com/spf13/viper"
Expand Down
2 changes: 1 addition & 1 deletion cmd/step.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package cmd
import (
"fmt"

"pg-cli/db"
"github.com/kohrVid/pg-cli/db"

_ "github.com/golang-migrate/migrate/v4/database/postgres"
_ "github.com/golang-migrate/migrate/v4/source/file"
Expand Down
2 changes: 1 addition & 1 deletion cmd/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package cmd
import (
"fmt"

"pg-cli/db"
"github.com/kohrVid/pg-cli/db"

_ "github.com/golang-migrate/migrate/v4/database/postgres"
_ "github.com/golang-migrate/migrate/v4/source/file"
Expand Down
11 changes: 9 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module pg-cli
module github.com/kohrVid/pg-cli

go 1.17

Expand Down Expand Up @@ -45,4 +45,11 @@ require (
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)

replace github.com/kohrVid/pg-cli v0.1.1 => pg-cli v0.1.1
retract (
// Mistake made in release DO NOT USE
v0.1.3
// Mistake made in release DO NOT USE
v0.1.2
// Mistake made in release DO NOT USE
v0.1.1
)
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/
package main

import "pg-cli/cmd"
import "github.com/kohrVid/pg-cli/cmd"

func main() {
cmd.Execute()
Expand Down
1 change: 0 additions & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,3 @@ gopkg.in/yaml.v2
# gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
## explicit
gopkg.in/yaml.v3
# github.com/kohrVid/pg-cli v0.1.1 => pg-cli v0.1.1

0 comments on commit 337975e

Please sign in to comment.