Skip to content

Instantly share code, notes, and snippets.

View giou-k's full-sized avatar

Konstantinos Georgiou giou-k

View GitHub Profile
@zebreus
zebreus / firebase.tf
Last active June 17, 2024 09:59
Terraform configuration for creating a firebase project with firestore, functions and storage
# firebase.tf https://gist.githubusercontent.com/Zebreus/906b8870e49586adfe8bd7bbff43f0a8/raw/firebase.tf
# Terraform configuration for creating a firebase project with firestore, functions and storage
# Unfinished
terraform {
required_providers {
google-beta = {
source = "hashicorp/google-beta"
version = "4.11.0"
}
@wayneashleyberry
wayneashleyberry / main.go
Created August 6, 2018 10:50
Go http server with graceful shutdown
package main
import (
"context"
"log"
"net/http"
"os"
"os/signal"
"syscall"
)
@posener
posener / go-table-driven-tests-parallel.md
Last active July 10, 2024 13:19
Be Careful with Table Driven Tests and t.Parallel()

Be Careful with Table Driven Tests and t.Parallel()

We Gophers, love table-driven-tests, it makes our unittesting structured, and makes it easy to add different test cases with ease.

Let’s create our table driven test, for convenience, I chose to use t.Log as the test function. Notice that we don't have any assertion in this test, it is not needed to for the demonstration.

func TestTLog(t *testing.T) {
	t.Parallel()