Skip to content

Instantly share code, notes, and snippets.

View Streppel's full-sized avatar

natan streppel Streppel

View GitHub Profile
// Package client provides primitives to interact with the openapi HTTP API.
//
// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT.
package client
import (
"context"
"encoding/json"
"fmt"
"io"
// db.go
// Code generated by sqlc. DO NOT EDIT.
package db
import (
"context"
"github.com/jackc/pgconn"
openapi: "3.0.0"
info:
version: 1.0.0
title: SimplySend Procurement API
license:
name: MANNING
servers:
- url: http://simplyspend.apisecurity.liveproject.manning.com/v1
paths:
/users:
openapi: "3.0.0"
info:
version: 1.0.0
title: Leave Granting API
license:
name: MANNING
servers:
- url: http://leavegrant.apisecurity.liveproject.manning.com/v1
paths:
/users:
@Streppel
Streppel / partial_json_to_struct.go
Last active March 6, 2022 01:47
partial JSON unmarshal to go struct
package main
import (
"encoding/json"
"fmt"
)
func main() {
var err error
myJson := []byte(`{"name": "Natan", "age": 27, "hobbies": ["programming", "inline_skatting"], "is_millionaire": false}`)
#!/usr/bin/env bash
echo "Starting bootstrapping"
# Check for Homebrew, install if we don't have it
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Install sdkman