DEV Community

Shootacean
Shootacean

Posted on • Edited on • Originally published at shootacean.com

GoでのHello, World

#go

GoのインストールからHello, Worldを出力するまでの手順です。

MacにGoをインストールする

$ brew install go
$ go version
go version go1.12.7 darwin/amd64
Enter fullscreen mode Exit fullscreen mode

Hello,Worldの実装

$ touch hello.go
Enter fullscreen mode Exit fullscreen mode
package main

import "fmt"

func main() {
    fmt.Println("Hello, World")
}
Enter fullscreen mode Exit fullscreen mode

Hello, Worldプログラムの実行

$ go run hello.go
Hello, World
Enter fullscreen mode Exit fullscreen mode

Top comments (2)

Collapse
 
dentych profile image
Dennis

I'm sorry, but what is the purpose of this? Are you making some sort of personal note folder on Dev.to? :P

Collapse
 
shootacean profile image
Shootacean

I'm sorry. This is a post test. It will be deleted after a while. :(

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay