Skip to content

Instantly share code, notes, and snippets.

View eminetto's full-sized avatar
:octocat:
always learning

Elton Minetto eminetto

:octocat:
always learning
View GitHub Profile
├── README.md
├── go.mod
├── go.sum
├── cmd
│ ├── api
│ │ └── main.go
│ └── appctl
│ └── main.go
├── config
│ ├── config.go
├── cmd
│ ├── api
│ │ └── main.go
│ └── appctl
│ └── main.go
├── book
│ ├── book.go
│ ├── service.go
│ ├── service_test.go
│ ├── mock
│ │ ├── use_case.go
│ │ ├── repository.go
│ ├── postgres
│ │ ├── book_storage.go
│ │ ├── book_storage_test.go
@eminetto
eminetto / eleicao_color.go
Created October 2, 2022 22:15
eleicao_color.go
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"time"
"github.com/charmbracelet/lipgloss"
@eminetto
eminetto / eleicao.go
Created October 2, 2022 21:50
eleicao.go
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"time"
)
@eminetto
eminetto / service_test.go
Created September 28, 2022 11:56
service_test.go
package service_test
import (
"testing"
"github.com/PicPay/example"
)
func TestFindAll(t *testing.T) {
s := example.NewService()
all, err := s.FindAll()
@eminetto
eminetto / service.go
Created September 28, 2022 11:55
service.go
package service
//NewService create new service
func NewService() *Service {
return &Service{}
}
//FindAll
func (s *Service) FindAll() ([]*entity.Privilege, error) {
acl := s.getDefaultPrivileges()
@eminetto
eminetto / profundo.c
Created September 8, 2022 23:13
Módulo profundo
int open(const char* path, int flags, mode_t permissions);
int close(int fd);
ssize_t read(int fd, void* buffer, size_t count);
ssize_t write(int fd, const void* buffer, size_t count);
off_t lseek(int fd, off_t offset, int referencePosition);
@eminetto
eminetto / raso.java
Created September 8, 2022 23:09
modulo raso
FileInputStream fileStream = new FileInputStream(fileName);
BufferedInputStream bufferedStream = new BufferedInputStream(fileStream);
ObjectInputStream objectStream = new ObjectInputStream(bufferedStream);