Git Product home page Git Product logo

gomove's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gomove's Issues

Install fails due to module path declaration in go.mod

When I try to install this package I get the following error:

go: github.com/KSubedi/gomove@latest: github.com/KSubedi/[email protected]: parsing go.mod:
	module declares its path as: github.com/ksubedi/gomove
	        but was required as: github.com/KSubedi/gomove

I've tried with a bunch of different Go versions:

$ go1.13.15 get -u github.com/KSubedi/gomove
go: finding github.com/KSubedi/gomove latest
go get: github.com/KSubedi/[email protected]: parsing go.mod:
	module declares its path as: github.com/ksubedi/gomove
	        but was required as: github.com/KSubedi/gomove

$ go1.18.3 install github.com/KSubedi/gomove@latest
go: github.com/KSubedi/gomove@latest: github.com/KSubedi/[email protected]: parsing go.mod:
	module declares its path as: github.com/ksubedi/gomove
	        but was required as: github.com/KSubedi/gomove

$ go1.20 install github.com/KSubedi/gomove@latest
go: github.com/KSubedi/gomove@latest: github.com/KSubedi/[email protected]: parsing go.mod:
	module declares its path as: github.com/ksubedi/gomove
	        but was required as: github.com/KSubedi/gomove

Seems like the case of the module declaration in go.mod needs to be fixed.

Can't install latest

alex@MacBook-Pro ~/c/ratchet (develop) [127]> go get -u github.com/ksubedi/gomove

go: finding github.com/ksubedi/gomove latest
go: downloading github.com/ksubedi/gomove v0.0.0-20181214015902-9efbee930b0e
go: extracting github.com/ksubedi/gomove v0.0.0-20181214015902-9efbee930b0e
go: finding golang.org/x/tools latest
go: downloading golang.org/x/tools v0.0.0-20191120001058-ad01d5993d97
go: finding github.com/mgutz/ansi latest
go: finding github.com/codegangsta/cli v1.22.1
go: downloading github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b
go: extracting github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b
go: downloading github.com/codegangsta/cli v1.22.1
go: extracting golang.org/x/tools v0.0.0-20191120001058-ad01d5993d97
go: extracting github.com/codegangsta/cli v1.22.1
go: github.com/ksubedi/gomove imports
	github.com/codegangsta/cli: github.com/codegangsta/[email protected]: parsing go.mod:
	module declares its path as: github.com/urfave/cli
	        but was required as: github.com/codegangsta/cli
alex@MacBook-Pro ~> go get -u github.com/ksubedi/gomove
# github.com/ksubedi/gomove
go/src/github.com/ksubedi/gomove/main.go:18:5: app.Author undefined (type *cli.App has no field or method Author)
go/src/github.com/ksubedi/gomove/main.go:21:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in array or slice literal:
	cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/ksubedi/gomove/main.go:26:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in array or slice literal:
	cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/ksubedi/gomove/main.go:30:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in array or slice literal:
	cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/ksubedi/gomove/main.go:37:13: cannot use func literal (type func(*cli.Context)) as type cli.ActionFunc in assignment

Add support for imports with explicit package name

Thanks for a great tool!

In using it for golang.org/x/tools, I found gomove missed imports that use an explicit package name:

import _ "a/package/name1"       // side-effects-only import
import myname "a/package/name2"  // imported as myname

// Alternatively...
import (
 "an/unrelated/package"

  _ "a/package/name1"
  myname "a/package/name2"
)

go.mod update support

It'd be nice (especially if migrating a project between orgs) to be able to run gomove and have it change the go.mod if necessary.

Not sure if this should be an optional thing, or something you explicitly don't want.

Basically, I'm thinking that running gomove github.com/myorg/my-repo github.com/neworg/my-repo would patch all the Go files, and also, update the module too (unless otherwise requested).

module github.com/myorg/my-repo => module github.com/neworg/my-repo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.