Skip to content

Instantly share code, notes, and snippets.

@knsh14
Last active August 29, 2015 14:09
Show Gist options
  • Save knsh14/e7ad75c1fd262288bc87 to your computer and use it in GitHub Desktop.
Save knsh14/e7ad75c1fd262288bc87 to your computer and use it in GitHub Desktop.
% vim test.go [~]
% go run test.go [~]
Set $TEST_HOGE = 1234
% echo $TEST_HOGE [~]
%
package main
import (
"fmt"
"os"
)
func main() {
fmt.Println("Set $TEST_HOGE = 1234")
os.Setenv("TEST_HOGE", "1234")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment