You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fury.apache.org by "donnol (via GitHub)" <gi...@apache.org> on 2024/07/31 08:21:06 UTC
[I] [Go] example is wrong [fury]
donnol opened a new issue, #1779:
URL: https://github.com/apache/fury/issues/1779
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/fury/issues) and found no similar issues.
### Version
latest
### Component(s)
Go
### Minimal reproduce step
[From](https://fury.apache.org/docs/start/usage#golang)
[Play](https://go.dev/play/p/E4UW68-5Rgj)
```go
package main
import furygo "https://github.com/apache/fury/go/fury"
import "fmt"
func main() {
type SomeClass struct {
F1 *SomeClass
F2 map[string]string
F3 map[string]string
}
fury := furygo.NewFury(true)
if err := fury.RegisterTagType("example.SomeClass", SomeClass{}); err != nil {
panic(err)
}
value := &SomeClass{F2: map[string]string{"k1": "v1", "k2": "v2"}}
value.F3 = value.F2
value.F1 = value
bytes, err := fury.Marshal(value)
if err != nil {
}
var newValue interface{}
// bytes can be data serialized by other languages.
if err := fury.Unmarshal(bytes, &newValue); err != nil {
panic(err)
}
fmt.Println(newValue)
}
```
### What did you expect to see?
Run successfully.
### What did you see instead?
prog.go:5:2: invalid import path: https://github.com/apache/fury/go/fury
### Anything Else?
should remove `https://` in the import path : `https://github.com/apache/fury/go/fury` like [this](https://go.dev/play/p/7dw-NQ55JbB).
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] [Go] example is wrong [fury]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang closed issue #1779: [Go] example is wrong
URL: https://github.com/apache/fury/issues/1779
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] [Go] example is wrong [fury]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #1779:
URL: https://github.com/apache/fury/issues/1779#issuecomment-2260297891
Good catch, thanks for reporting this issue @donnol
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org