如何在Go中调用未导出的类的方法

I want to invoke http.Server's newConn method in net/http/server.go

func (srv *Server) newConn(rwc net.Conn) *conn {
    c := &conn{
        server: srv,
        rwc:    rwc,
    }
    if debugServerConnections {
        c.rwc = newLoggingConn("server", c.rwc)
    }
    return c
}

Tried to access using reflect but errors occured

conn := ...
server := &http.Server{}

inputs := make([]reflect.Value, 1)
inputs[0] = reflect.ValueOf(conn)
c := reflect.ValueOf(server).MethodByName("newConn").Call(inputs)
panic: reflect: call of reflect.Value.Call on zero Value

goroutine 17 [running, locked to thread]:
reflect.flag.mustBe(0x0, 0x13)
    /usr/local/go/src/reflect/value.go:201 +0xae
reflect.Value.Call(0x0, 0x0, 0x0, 0xc420047d10, 0x1, 0x1, 0x0, 0x0, 0xc4200e82c0)
    /usr/local/go/src/reflect/value.go:300 +0x38

Is there any solution?

TLDR You don't. That's the whole point of not exporting things; to prevent direct access to them.

Having said that, this question sounds a lot like an XY Problem. Perhaps if you can explain what you're trying to accomplish, we can suggest an alternative approach.

Longer answer

This can be possible with reflection (as you're attempting). This should only be done in the absolute rarest of situations, if even then.

To help with that, please include a complete, reproducible example. The code you've included doesn't compile, so it's impossible to debug.