aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/os/proc.go
diff options
context:
space:
mode:
authorcornelk <[email protected]>2020-05-12 00:05:11 +0300
committerAyke <[email protected]>2020-05-12 16:53:07 +0200
commite907db1481c73ef778b37b5c5478037e390768fc (patch)
treecb1af2a22ded7dac7e1d19305db512cec880f754 /src/os/proc.go
parent6b8940421e169a751dd039d8c7d1b1c4a1465fb2 (diff)
downloadtinygo-e907db1481c73ef778b37b5c5478037e390768fc.tar.gz
tinygo-e907db1481c73ef778b37b5c5478037e390768fc.zip
os: add Args and stub it with mock data
Diffstat (limited to 'src/os/proc.go')
-rw-r--r--src/os/proc.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/os/proc.go b/src/os/proc.go
index a7718c436..d3bfb1270 100644
--- a/src/os/proc.go
+++ b/src/os/proc.go
@@ -9,6 +9,15 @@ import (
"syscall"
)
+// Args hold the command-line arguments, starting with the program name.
+var Args []string
+
+func init() {
+ Args = runtime_args()
+}
+
+func runtime_args() []string // in package runtime
+
// Exit causes the current program to exit with the given status code.
// Conventionally, code zero indicates success, non-zero an error.
// The program terminates immediately; deferred functions are not run.