Skip to content

Instantly share code, notes, and snippets.

View valsteen's full-sized avatar

Vincent Alsteen valsteen

View GitHub Profile
@valsteen
valsteen / chain.go
Created November 6, 2022 12:59
Chaining calls until something fails, with error mapping
package main
import (
"errors"
"fmt"
"strconv"
"testing"
"github.com/stretchr/testify/require"
)
@valsteen
valsteen / option.go
Created December 30, 2022 15:39
Option generics with (un)marshalling
package main
import (
"encoding/json"
"fmt"
)
type TenantProfileEntity struct {
SomeOtherValue string
}