This sample explores the idea that middlewares can be injected into an http.Handler
instead of wrapping it.
The current model is:
type mwf func(http.Handler) http.Handler
func oldRecoverer(h http.Handler) http.Handler {
semver -> ver ("-" pre)? ("+" build)?; | |
ver -> num "." num "." num; | |
pre -> (alnum | num):"."; | |
build -> (alnum | \d+):"."; | |
num -> "0"|[1-9]\d*; | |
alnum -> [-A-Za-z0-9]* [-A-Za-z] [-A-Za-z0-9]*; |
Add this snippet to your .*shrc
.
gx() {(
set -e
# If working tree dirty bar staged content...
if git status --porcelain | grep -v '^. ' >/dev/null; then
echo "⮑ Temporarily stashing unstaged and untracked content."
git stash push --keep-index --include-untracked
unstash() {
package main | |
import ( | |
"fmt" | |
"log" | |
"os" | |
"github.com/anzx/envelope-compose-go/internal/rpc/wasm/client/gowasmer" | |
) |