Go 환경변수 다루기

Jmnote (토론 | 기여)님의 2020년 9월 15일 (화) 13:53 판 (새 문서: ==개요== ;Go 환경변수 다루기 <source lang='go' run> package main import ( "fmt" "os" "strings" ) func main() { os.Setenv("FOO", "1") fmt.Println("FOO:"...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요

Go 환경변수 다루기
package main

import (
    "fmt"
    "os"
    "strings"
)

func main() {
    os.Setenv("FOO", "1")
    fmt.Println("FOO:", os.Getenv("FOO"))
    fmt.Println("BAR:", os.Getenv("BAR"))
}

2 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}