ํด๋น๊ธ์ ์๋ ๋ด์ฉ์ ๋ฐํ์ผ๋ก ๊ณต๋ถํ ๋ด์ฉ๋ค์ ์ ๋ฆฌํ ๊ธ ์ ๋๋ค.
Go๋ฅผ ํฅํ ์ฌํ
go-tour-ko.appspot.com
Hello
package main
import "fmt"
func main() {
fmt.Println("Hello")
}
go์ ๊ฐ์ฅ ๊ธฐ๋ณธ์ ์ธ "hello" ์ถ๋ ฅํ๊ธฐ
์ด๋ป๊ฒ ์ฌ์ฉ์ ํ๋๊ฑด์ง ํ๋ฒ ํด๋ด๋ผ ๋ผ๋ ๋ด์ฉ
time
package main
import (
"fmt"
"time"
)
func main() {
fmt.Println("Welcome to the playground!")
fmt.Println("The time is", time.Now())
}
time ํจํค์ง ์๊ฐ์ ํํํ๊ธฐ ์ํ ํจ์๋ค์ ๊ฐ์ง๊ณ ์์
time.Now() ํ์ฌ ์๊ฐ์ ๊ฐ์ ธ์จ๋ค.
ํ์๊ฐ ํ์ฌ ํ๋ก๊ทธ๋จ์ ๋๋ฆฌ๊ณ ์๋ ์๊ฐ์ ๋ณด๋ฅผ ๊ฐ์ ธ์ฌ ์ ์๋ค.
'programming language > Go' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Go] go-tour _ flowcontrol (0) | 2021.09.25 |
---|---|
[Go] go-tour _ basics [17/17] (1) | 2021.09.23 |
[Go] go-tour _ basics [9/17] (2) | 2021.09.22 |
[Go] hello world ์ถ๋ ฅ ํด์ํ๊ธฐ (0) | 2021.09.19 |
go ์ค์น (2) | 2021.09.19 |