package main

import (
	"context"
	"fmt"
	"math/rand"
	"time"

	"github.com/fastly/compute-sdk-go/fsthttp"
)

func main() {
	fsthttp.ServeFunc(func(ctx context.Context, w fsthttp.ResponseWriter, r *fsthttp.Request) {
		rnd := rand.New(rand.NewSource(time.Now().UnixNano()))
		w.WriteHeader(fsthttp.StatusOK)
		fmt.Fprintf(w, "%d", rnd.Intn(100))
	})
}