Language

Run Go scripts online, compiled and cached for you

Write package main with func Main and Waiso builds it with the Go toolchain, caches the binary and runs it in an isolated sandbox. Then schedule it, call it over HTTP or chain it in a flow.

func Main, not func main

Main has a capital M because Waiso supplies the real main. Each parameter is an input typed by its Go type, matched in order. Return (value, error): a non-nil error fails the run.

Learn more →
word_stats.go
package main

import (
	"fmt"
	"strings"
)

func Main(text string, minLength int) (any, error) {
	long := 0
	for _, w := range strings.Fields(text) {
		if len(w) >= minLength {
			long++
		}
	}
	fmt.Printf("%d long words\n", long)
	return map[string]int{"long": long}, nil
}

The standard library and waiso.dev/waiso

Go scripts install no modules: they use the standard library plus the Waiso library, imported as waiso.dev/waiso, with waiso.Run, waiso.Flow and waiso.StateGet.

Learn more →

A binary behind an endpoint

Publish it and the compiled script answers an HTTP endpoint, runs on a schedule, or becomes a flow step whose inputs are bound to earlier steps’ outputs.

Learn more →

Questions

Is my Go code compiled on every run?

No. The compiled binary is cached, so a second run of unchanged code skips the compiler.

Can I add third-party Go modules?

No. Only the standard library and the Waiso library are available to a Go script.

What types can a parameter have?

string, int, float64 and bool, plus slices, maps and structs for lists and JSON objects.

Related

Get started today

Ready to ship some scripts?

Create an account in seconds — no installers, nothing to set up.
Start building, testing and running your scripts right away.

  • Free to start
  • Self-host or cloud
  • Production ready