Skip to content

Instantly share code, notes, and snippets.

View phillipahereza's full-sized avatar
🖖
Write tests and prosper

phillipahereza

🖖
Write tests and prosper
View GitHub Profile
@phillipahereza
phillipahereza / chunkz.go
Created January 21, 2024 17:25
chunk downloads
package main
import (
"errors"
"fmt"
"io"
"log"
"net/http"
"os"
"sort"
@phillipahereza
phillipahereza / gomock.md
Created September 13, 2022 06:20 — forked from thiagozs/gomock.md
Tutorial gomock

08/16/17 by  Sergey Grebenshchikov

No Comments

This is a quick tutorial on how to test code using the GoMock mocking library and the standard library testing package testing.

GoMock is a mock framework for Go. It enjoys a somewhat official status as part of the github.com/golang organization, integrates well with the built-in testing package, and provides a flexible expectation API.

@phillipahereza
phillipahereza / go-stdlib-interface-selected.md
Created January 28, 2022 14:27 — forked from asukakenji/go-stdlib-interface-selected.md
Go (Golang) Standard Library Interfaces (Selected)

Go (Golang) Standard Library Interfaces (Selected)

This is not an exhaustive list of all interfaces in Go's standard library. I only list those I think are important. Interfaces defined in frequently used packages (like io, fmt) are included. Interfaces that have significant importance are also included.

All of the following information is based on go version go1.8.3 darwin/amd64.

Keybase proof

I hereby claim:

  • I am phillipahereza on github.
  • I am ahereza (https://keybase.io/ahereza) on keybase.
  • I have a public key ASAxJV_mKcUdrptYpuh29l-1DS0454azta8Pxbdxohiopwo

To claim this, I am signing this object:

@phillipahereza
phillipahereza / pipenv_cheat_sheet.md
Last active May 30, 2019 13:07 — forked from bradtraversy/pipenv_cheat_sheet.md
Pipenv cheat sheet for common commands

Pipenv Cheat Sheet

Install pipenv

pip3 install pipenv

Activate

pipenv shell