begin-handler /fetch public call-web "https://google.com" response text response-headers head print-out head new-line print-out text new-line end-handlerCopied!
Golf is unlike other languages. It's simpler and declarative. You can do much in a single line.
Lots of great features and rich functionality. Build back-end applications super fast.
Built with industry-standard Free Open Source libraries for performance, functionality, stability and compatibility.
Memory safety that's fast and lean, so you can have both performance and safety.
Automatic memory release to avoid leaks in long-running server processes.
Smart status checking of your code to avoid mistakes from the get-go.
Golf doesn't need sudo permissions because it installs in a home folder. Install Golf now.
Visit Documentation for a clear and concise manual. Check out examples too.
Performance is important. That's why Golf makes native executables from smartly generated C code, optimized for speed and efficiency.
C is the fastest and most efficient and having it as a foundation is important.
Build for the web, build command-line programs, build application servers.
Powerful features such as database access, JSON, Regex, XML, encryption and more.
Licensed under Apache 2 Free Open Source License. Source code always at your fingertips at:
https://github.com/golf-lang/golf
Golf installs from source only for safety and performance, so you don't need to download any binaries. Not to worry, the install process is fully automated. Install Golf now.
begin-handler /update-order out-header use content-type "application/json" get-param order_id, item_id, quantity set-number arows // If quantity update is 0, issue SQL to delete an item from order, otherwise update if-true quantity equal "0" run-query @db ="delete from orderItems where orderID='%s' and itemID='%s'" \ : order_id, item_id no-loop affected-rows arows else-if run-query @db ="update orderItems set quantity='%s' where orderID='%s' and itemID='%s'" \ : quantity, order_id, item_id no-loop affected-rows arows end-if @"<<print-out arows>>" end-handlerCopied!
Current version is 3.1.0. This release passed 2922 functional tests. Check out Golf blog for new releases and other news, including new examples.
Tested on major Linux distributions, such as Ubuntu, Debian, Redhat, Fedora, OpenSUSE and Arch.