Hi, I'm playing with modules.

Something doesn't works for me.

I have this code in main.go outside of GOPATH directory in 
*/Users/me/goO/mycat:*

package main

  

import (

        "io"

        "os"


        "github.com/sirupsen/logrus"

)


func main() {

        _, err := io.Copy(os.Stdout, os.Stdin)

        if err != nil {

                logrus.Fatal(err)

        }

}



 

I ran *go mod init /Users/me/goO/mycat*

file* go.mod *created.

No I'm running *go build*, which I believe should return list of packages. 
But instead it returns following message:

*build /Users/me/goO/src/mycat: cannot find module for path 
github.com/sirupsen/logrus*

*mac os mojave*
*go v1.11.5*

What I'm missing here?

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to