Fix incorrect type switches
This commit is contained in:
@@ -61,7 +61,29 @@ func (o OnionSkins) Token(tok sha256.Hash) OnionSkins {
|
||||
|
||||
func (o OnionSkins) Assemble() (on Onion) {
|
||||
for i := range o {
|
||||
_ = i
|
||||
oc := o[len(o)-i-1]
|
||||
switch oc.(type) {
|
||||
case *Message:
|
||||
|
||||
case *Forward:
|
||||
|
||||
case *Exit:
|
||||
|
||||
case *Return:
|
||||
|
||||
case *Cipher:
|
||||
|
||||
case *Purchase:
|
||||
|
||||
case *Session:
|
||||
|
||||
case *Acknowledgement:
|
||||
|
||||
case *Response:
|
||||
|
||||
case *Token:
|
||||
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -51,6 +51,8 @@ type Message struct {
|
||||
Onion
|
||||
}
|
||||
|
||||
var _ Onion = &Message{}
|
||||
|
||||
const OnionHeaderLen = 4 + nonce.IVLen + address.Len + pub.KeyLen
|
||||
|
||||
func (on *Message) Len() int { return MagicLen + OnionHeaderLen + on.Onion.Len() }
|
||||
|
||||
@@ -13,11 +13,11 @@ var (
|
||||
// GitRef is the gitref, as in refs/heads/branchname.
|
||||
GitRef = "refs/heads/main"
|
||||
// ParentGitCommit is the commit hash of the parent HEAD.
|
||||
ParentGitCommit = "5deee6f599b306ad79d2fa7503919938d72b255e"
|
||||
ParentGitCommit = "f11a3d7d23febb46ed83359c800a1a605b023b58"
|
||||
// BuildTime stores the time when the current binary was built.
|
||||
BuildTime = "2022-12-19T10:45:08Z"
|
||||
BuildTime = "2022-12-19T11:16:58Z"
|
||||
// SemVer lists the (latest) git tag on the build.
|
||||
SemVer = "v0.0.187"
|
||||
SemVer = "v0.0.188"
|
||||
// PathBase is the path base returned from runtime caller.
|
||||
PathBase = "/home/loki/src/github.com/Indra-Labs/indra/"
|
||||
// Major is the major number from the tag.
|
||||
@@ -25,7 +25,7 @@ var (
|
||||
// Minor is the minor number from the tag.
|
||||
Minor = 0
|
||||
// Patch is the patch version number from the tag.
|
||||
Patch = 187
|
||||
Patch = 188
|
||||
)
|
||||
|
||||
// Version returns a pretty printed version information string.
|
||||
|
||||
Reference in New Issue
Block a user