Langoost by example
Complete, annotated programs. Each one is small enough to read in a sitting and shows a single idea clearly.
Hello, world
hello-world.goostThe smallest Langoost program — declare a variable and print a greeting with string concatenation.
FizzBuzz
fizzbuzz.goostFizzBuzz in Langoost using for..in with range and if / else if / else.
Prime numbers
primes.goostFind prime numbers in Langoost — a recursive-free isPrime check, a while loop, and the immutable append pattern for building an array.
HTTP server
http-server.goostA small JSON HTTP server in Langoost using http.serve and a handler that routes on method and path and returns string responses with status prefixes.
HTTP client
http-client.goostMake HTTP requests in Langoost — GET, POST, and a generic request with custom headers using the http module.
Concurrency
concurrency.goostBackground work in Langoost with the thread module — spawn a goroutine, pass messages over a channel, and await an async future.
JSON data
json-data.goostBuild and manipulate JSON in Langoost using inline json literals and the json module — get, set, merge, and pretty-print.