Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
always learning

Elton Minetto eminetto

:octocat:
always learning
View GitHub Profile
@eminetto
eminetto / rfc.md
Created May 22, 2021
Template of RFCs
View rfc.md

Title

Problem description

We must explain the problem clearly and identify additional details that the team needs to know. We must here describe the context, what we did so far, and the current state.

The description also serves as a trail that we can go back to in the future to understand the reasoning we had at the time and see what restrictions and requirements have changed.

Possible approaches

@eminetto
eminetto / rfc.md
Created May 15, 2021
Template de RFC
View rfc.md

Título

Descrição do problema

Devemos explicar o problema claramente e identificar detalhes adicionais que a equipe precise saber. Devemos aqui descrever o contexto, o que foi feito até agora e o estado atual.

A descrição também serve como uma trilha à qual podemos voltar no futuro para entender o raciocínio que tínhamos na época e ver quais restrições e requisitos mudaram.

Possíveis abordagens

View can.go
//this way?
func CanSubscribe(userID int, courseID int) bool {
}
//this way?
func CanSubscribe(userID int, courseID int) error {
//if can't subscribe return an error
//if can return nil
//if there's an error, like a database connection error, return the error itself
View dicas_hugo.md

Dividir o texto entre página incial e o conteúdo

Criar novo conteúdo

hugo new post/2016-07-22-como-usamos-o-slack-na-coderockr.md

Testar localmente

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)