rizinorg/rz-pipe

golang rzpipe install not working

ctlayon opened this issue · 0 comments

Running arch linux with go version go1.17 linux/amd64.

package main

import (
	"github.com/rizinorg/rz-pipe/go"
)

func main() {

	r2p, err := rzpipe.NewPipe("/bin/ls")
	if err != nil {
		panic(err)
	}
	defer r2p.Close()
}

Output of trying to install

go/src/hello2                                                                                                                                                
▶ go version
go version go1.17 linux/amd64

go/src/hello2                                                                                                                                                                                                                                                                                                          
▶ go mod init                                                                                                                                                                                                                                                                                                             
go: creating new go.mod: module hello2                                                                                                                                                                                                                                                                                    
go: to add module requirements and sums:                                                                                                                                                                                                                                                                                  
        go mod tidy                                                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                                                          
go/src/hello2                                                                                                                                                                                                                                                                                                             
▶ go mod tidy                                                                                                                                                                                                                                                                                                             
go: finding module for package github.com/rizinorg/rz-pipe/go                                                                                                                                                                                                                                                             
go: found github.com/rizinorg/rz-pipe/go in github.com/rizinorg/rz-pipe/go v0.0.0-20210623092913-2128c46e5221                                                                                                                                                                                                             
go: hello2 imports                                                                                                                                                                                                                                                                                                        
        github.com/rizinorg/rz-pipe/go: github.com/rizinorg/rz-pipe/go@v0.0.0-20210623092913-2128c46e5221: parsing go.mod:                                                                                                                                                                                                
        module declares its path as: github.com/rizinorg/rz-pipe                                                                                                                                                                                                                                                          
                but was required as: github.com/rizinorg/rz-pipe/go           

I've also tried using rz-pm with the same results. I'm not sure if this is an issue with my version of go or with go.mod:

module github.com/rizinorg/rz-pipe

go 1.15

require github.com/rainycape/dl v0.0.0-20151222075243-1b01514224a1

I can clone the repo directly and use replace to get it to work but it would be nice to be able to just go get <blah> or rz-pm install rz-pipe-go:

module hello

go 1.17

require github.com/rizinorg/rz-pipe/go v0.0.0-00010101000000-000000000000

require github.com/rainycape/dl v0.0.0-20151222075243-1b01514224a1 // indirect

replace github.com/rizinorg/rz-pipe/go => /home/majesticboar/go/src/github.com/rizinorg/rz-pipe/go