1
0
Fork 0
forked from External/grumble

Major gofix run.

This commit is contained in:
Mikkel Krautz 2011-11-08 15:05:13 +01:00
parent 92e6ac5276
commit 71b8314c2e
28 changed files with 522 additions and 559 deletions

View file

@ -6,7 +6,7 @@ package main
import (
"encoding/hex"
"os"
"errors"
)
// This file implements Server's handling of Users.
@ -26,12 +26,12 @@ type User struct {
}
// Create a new User
func NewUser(id uint32, name string) (user *User, err os.Error) {
func NewUser(id uint32, name string) (user *User, err error) {
if id < 0 {
return nil, os.NewError("Invalid user id")
return nil, errors.New("Invalid user id")
}
if len(name) == 0 {
return nil, os.NewError("Invalid username")
return nil, errors.New("Invalid username")
}
return &User{