LoginSignup
0
0

More than 3 years have passed since last update.

今日からGO言語 入門 〜Part2 Import 〜

Last updated at Posted at 2020-02-24

Go言語 Importについて

Importは、Goが標準で提供するライブラリ(またはパッケージ)をインポートするためのもの

例)
- fmt
- os
- time

などなど。
パッケージの一覧はこちら

Importの書き方

main.go
import "fmt"

複数インポートする場合は、

main.go
import (
  "fmt"
  "time"
  "os/user"
)

と書くことができる

go docを使用して、コンソールからライブラリ情報を閲覧する方法

[形式]

$ go doc ライブラリー名

[例]

$ go doc fmt
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0