mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
single argument panic on non-darwin and in comments
R=r CC=golang-dev https://golang.org/cl/800042
This commit is contained in:
parent
ac58f646ac
commit
1231382b9e
6 changed files with 12 additions and 12 deletions
|
|
@ -74,14 +74,14 @@ func newClient(resourceName, host, origin, location, protocol string, rwc io.Rea
|
|||
func main() {
|
||||
ws, err := websocket.Dial("ws://localhost/ws", "", "http://localhost/");
|
||||
if err != nil {
|
||||
panic("Dial: ", err.String())
|
||||
panic("Dial: " + err.String())
|
||||
}
|
||||
if _, err := ws.Write([]byte("hello, world!\n")); err != nil {
|
||||
panic("Write: ", err.String())
|
||||
panic("Write: " + err.String())
|
||||
}
|
||||
var msg = make([]byte, 512);
|
||||
if n, err := ws.Read(msg); err != nil {
|
||||
panic("Read: ", err.String())
|
||||
panic("Read: " + err.String())
|
||||
}
|
||||
// use msg[0:n]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue