ich dieses Golang Projekt bin Verbesserung: https://github.com/webrtc/apprtc/blob/master/src/collider/collider/collider.gogehen lang zu viele Argumente in Call
ich neue Parameter in die Run-Methode hinzugefügt:
// Run starts the collider server and blocks the thread until the program exits.
func (c *Collider) Run(p int, useTls bool, cert string, key string) {
http.Handle("/ws", websocket.Handler(c.wsHandler))
http.HandleFunc("/status", c.httpStatusHandler)
http.HandleFunc("/", c.httpHandler)
var e error
und es wird von main.go aufgerufen:
https://github.com/webrtc/apprtc/blob/master/src/collider/collidermain/main.go
// run the program
func (p *program) run() {
configuration := InitConfiguration()
log.Printf("Running collider: tls = %t, port = %d, room_server=%s",
configuration.Tls, configuration.Port, configuration.RoomServer)
c := collider.NewCollider(configuration.RoomServer)
c.Run(configuration.Port, configuration.Tls, configuration.Cert, configuration.Key)
}
Aus irgendwelchen Gründen halte ich th bekommen e unter Fehler:
/usr/local/go/src/collidermain/main.go:84: too many arguments in call to c.Run
Ich habe überqueren Sie die src in: /usr/local/go/src/Collider /usr/local/go/src/collidermain
Alles ist in Ordnung. Nicht sicher, warum dieser Fehler weiterhin auftritt.
Irgendwelche Gedanken?
Sind Sie sicher, dass Sie Ihren Code importieren und nicht das Original? – jmaloney