This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"bytes" | |
) | |
func main() { | |
b := NewBoard() | |
fmt.Println(b.BoardRepresentation()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"bytes" | |
) | |
func main() { | |
b := NewBoard() | |
fmt.Println(b.BoardRepresentation()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package chess | |
import "bytes" | |
type piece struct { | |
representation string | |
} | |
type location struct { | |
current *piece |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package chess | |
type piece struct { | |
representation string | |
} | |
type location struct { | |
current *piece | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package contact | |
import ( | |
"strings" | |
"fmt" | |
) | |
type friends struct { | |
data []string | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package contact | |
import "fmt" | |
type person struct { | |
name string | |
friends []string | |
} | |
type friend struct { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ecommerce | |
import ( | |
"strconv" | |
) | |
type order struct { | |
pid productID | |
cid customerID | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ecommerce | |
import ( | |
"strconv" | |
) | |
type order struct { | |
pid productID | |
cid customerID | |
} |