Elton Minetto eminetto

-
Codenation
- Florianópolis
- Sign in to view email
- http://eltonminetto.net
View board_v2.go
package main | |
import ( | |
"fmt" | |
"bytes" | |
) | |
func main() { | |
b := NewBoard() | |
fmt.Println(b.BoardRepresentation()) |
View board.go
package main | |
import ( | |
"fmt" | |
"bytes" | |
) | |
func main() { | |
b := NewBoard() | |
fmt.Println(b.BoardRepresentation()) |
View ex13.go
type Reader interface { | |
Find(id entity.ID) (*entity.User, error) | |
FindByEmail(email string) (*entity.User, error) | |
FindByChangePasswordHash(hash string) (*entity.User, error) | |
FindByValidationHash(hash string) (*entity.User, error) | |
FindByChallengeSubmissionHash(hash string) (*entity.User, error) | |
FindByNickname(nickname string) (*entity.User, error) | |
FindAll() ([]*entity.User, error) | |
} |
View ex12.go
type Repository interface { | |
Find(id entity.ID) (*entity.User, error) | |
FindByEmail(email string) (*entity.User, error) | |
FindByChangePasswordHash(hash string) (*entity.User, error) | |
FindByValidationHash(hash string) (*entity.User, error) | |
FindByChallengeSubmissionHash(hash string) (*entity.User, error) | |
FindByNickname(nickname string) (*entity.User, error) | |
FindAll() ([]*entity.User, error) | |
Update(user *entity.User) error | |
Store(user *entity.User) (entity.ID, error) |
View ex11.go
package chess | |
import "bytes" | |
type piece struct { | |
representation string | |
} | |
type location struct { | |
current *piece |
View ex10.go
package chess | |
type piece struct { | |
representation string | |
} | |
type location struct { | |
current *piece | |
} |
View ex9.go
package contact | |
import ( | |
"strings" | |
"fmt" | |
) | |
type friends struct { | |
data []string | |
} |
View ex8.go
package contact | |
import "fmt" | |
type person struct { | |
name string | |
friends []string | |
} | |
type friend struct { |
View ex7.go
package ecommerce | |
import ( | |
"strconv" | |
) | |
type order struct { | |
pid productID | |
cid customerID | |
} |
View ex6.go
package ecommerce | |
import ( | |
"strconv" | |
) | |
type order struct { | |
pid productID | |
cid customerID | |
} |
NewerOlder