Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    nicholaspei
    @nicholaspei
    Hi
    Tranch
    @tranch-xiao
    This message was deleted
    Tranch
    @tranch-xiao

    运行以下代码时

    package main
    
    import (
        "fmt"
        "github.com/hprose/hprose-go"
    )
    
    type clientStub struct {
        subtract func(int, int) int
    }
    
    func main() {
        client := hprose.NewClient("tcp://127.0.0.1:9090")
        var ro *clientStub
        client.UseService(&ro)
        fmt.Println(ro.subtract(1, 2))
    }

    报错:

    panic: reflect: reflect.Value.Set using value obtained using unexported field
    
    goroutine 1 [running]:
    panic(0x6407e0, 0xc42000d160)
            /usr/local/go/src/runtime/panic.go:500 +0x1a1
    reflect.flag.mustBeAssignable(0x1b3)
            /usr/local/go/src/reflect/value.go:225 +0x1a2
    reflect.Value.Set(0x64d0a0, 0xc42002a030, 0x1b3, 0x64d0a0, 0xc4200bcaa0, 0x13)
            /usr/local/go/src/reflect/value.go:1327 +0x2f
    github.com/hprose/hprose-go.(*BaseClient).createStub(0xc420058640, 0x62fb60, 0xc42002a028, 0x0, 0x0)
            /home/vagrant/go/src/github.com/hprose/hprose-go/client.go:576 +0x384
    github.com/hprose/hprose-go.(*BaseClient).UseService(0xc420058640, 0xc42000d130, 0x1, 0x1)
            /home/vagrant/go/src/github.com/hprose/hprose-go/client.go:256 +0x132
    main.main()
            /var/www/html/hprose.go:15 +0xd5
    exit status 2
    Tranch
    @tranch-xiao
    原来是大小写问题……
    Julian Frank
    @julianfrank
    Hi What Code do I put in the hProse-Golang to Serve the html5 client code? I dont see any documents on this topic... Pls help