Documentation
¶
Overview ¶
Package system exposes JVM-faithful java.lang.System equivalents for code running on glojure. Each symbol is published two ways:
- as a Go package-level value (used when gloat AOT-compiles a Clojure call site to a direct Go reference such as `compatsystem.Exit`); and
- through glojure's pkgmap (used by the REPL and any dynamic resolution path).
Where the JVM signature returns a possibly-null String (System.getenv, System.getProperty), the bridge converts gojava's (string, bool) result into either the string value or nil so Clojure idioms like (when-let [v (System/getenv "HOME")] ...) work without extra glue.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Stream values, exposed under System.out / System.err / System.in. They carry the Go methods (Println, Print, Printf, Write, Flush, Read) that glojure's FieldOrMethod resolves to from Clojure call sites like (.println System/out ...) (it capitalizes the first letter).
Functions ¶
func ClearProperty ¶
ClearProperty returns the previous value (or nil if none).
func GetProperty ¶
GetProperty dispatches on arity: one arg returns the value or nil; two args returns the value or the default.
func Getenv ¶
Getenv dispatches on arity: zero args returns a Clojure-visible map of all env vars; one arg returns the value as a string, or nil if unset.
func LineSeparator ¶
func LineSeparator() string
func SetProperty ¶
SetProperty returns the previous value (or nil if none).