blorticus / smpp

SMPP Libraries and Simulators in golang
GNU General Public License v3.0
7 stars 1 forks source link

install error #1

Open parsibox opened 1 year ago

parsibox commented 1 year ago

go: downloading github.com/blorticus/smpp-go v0.1.0 go: github.com/blorticus/smpp-go@v0.1.0: parsing go.mod: module declares its path as: github.com/blorticus/smpp but was required as: github.com/blorticus/smpp-go

blorticus commented 1 year ago

@parsibox: From where is this failing? The mod definition matches the path (i.e., github.com/blorticus/smpp). In the past, I broke this, but tag v0.1.0 appears to be correct to me. As an example, if I have the following two files:

# go.mod
module main

go 1.20

require github.com/blorticus/smpp v0.1.0

and:

package main

import (
   "github.com/blorticus/smpp"
   "fmt"
)

func main() {
    pdu := &smpp.PDU{
        CommandLength: 1,
        CommandID: smpp.CommandGenericNack,
    }

    fmt.Printf("length = %d\n", pdu.CommandLength)
}

The following work as expected:

$ go mod tidy
go: finding module for package github.com/blorticus/smpp
go: downloading github.com/blorticus/smpp v0.1.0
go: found github.com/blorticus/smpp in github.com/blorticus/smpp v0.1.0

$ go run .
length = 1

If you are using this and your go.mod has:

require github.com/blorticus/smpp-go v0.1.0

you should be able to change this to:

require github.com/blorticus/smpp v0.1.0

then re-run go mod tidy.

If this is breaking from a package that you didn't create, would you kindly point me to the repository for it?