teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

4

注意点追記

2021/05/24 02:25

投稿

nobonobo
nobonobo

スコア3367

answer CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  go.modファイルを生成するには「go mod init モジュール名」と言うコマンドを実行します。
4
4
 
5
+ 注意:この時のモジュール名にはあなたのアプリケーションとして命名したものを指定してください。
6
+
5
7
  ## 追記
6
8
 
7
9
  その後以下の様に依存をgo-getしましょう。

3

クリーンな環境からインストールしてみました。

2021/05/24 02:25

投稿

nobonobo
nobonobo

スコア3367

answer CHANGED
@@ -8,6 +8,91 @@
8
8
  ```shell
9
9
  % go get fyne.io/fyne/v2/...
10
10
  # 現バージョンの出力例
11
+ go: finding fyne.io/fyne v1.4.3
12
+ go: downloading fyne.io/fyne v1.4.3
13
+ go: finding fyne.io/fyne/v2 v2.0.3
11
14
  go: downloading fyne.io/fyne/v2 v2.0.3
15
+ go: extracting fyne.io/fyne v1.4.3
12
- go get: added fyne.io/fyne/v2 v2.0.3
16
+ go: extracting fyne.io/fyne/v2 v2.0.3
17
+ go: downloading github.com/stretchr/testify v1.5.1
18
+ go: downloading github.com/goki/freetype v0.0.0-20181231101311-fa8a33aabaff
19
+ go: downloading github.com/fyne-io/mobile v0.1.3-0.20210412090810-650a3139866a
20
+ go: downloading golang.org/x/image v0.0.0-20200430140353-33d19683fad8
21
+ go: downloading golang.org/x/tools v0.0.0-20200328031815-3db5fc6bac03
22
+ go: downloading github.com/fredbi/uri v0.0.0-20181227131451-3dcfdacbaaf3
23
+ go: downloading github.com/srwiley/rasterx v0.0.0-20200120212402-85cb7272f5e9
24
+ go: extracting github.com/stretchr/testify v1.5.1
25
+ go: downloading golang.org/x/sys v0.0.0-20200720211630-cb9d2d5c5666
26
+ go: extracting github.com/fredbi/uri v0.0.0-20181227131451-3dcfdacbaaf3
27
+ go: downloading github.com/srwiley/oksvg v0.0.0-20200311192757-870daf9aa564
28
+ go: extracting github.com/goki/freetype v0.0.0-20181231101311-fa8a33aabaff
29
+ go: extracting github.com/srwiley/rasterx v0.0.0-20200120212402-85cb7272f5e9
30
+ go: extracting github.com/fyne-io/mobile v0.1.3-0.20210412090810-650a3139866a
31
+ go: downloading github.com/go-gl/gl v0.0.0-20190320180904-bf2b1f2f34d7
32
+ go: downloading github.com/lucor/goinfo v0.0.0-20200401173949-526b5363a13a
33
+ go: downloading gopkg.in/yaml.v2 v2.2.8
34
+ go: extracting golang.org/x/sys v0.0.0-20200720211630-cb9d2d5c5666
35
+ go: extracting github.com/lucor/goinfo v0.0.0-20200401173949-526b5363a13a
36
+ go: extracting golang.org/x/tools v0.0.0-20200328031815-3db5fc6bac03
37
+ go: downloading github.com/go-gl/glfw/v3.3/glfw v0.0.0-20210410170116-ea3d685f79fb
38
+ go: extracting github.com/srwiley/oksvg v0.0.0-20200311192757-870daf9aa564
39
+ go: downloading github.com/pmezard/go-difflib v1.0.0
40
+ go: extracting gopkg.in/yaml.v2 v2.2.8
41
+ go: downloading github.com/godbus/dbus/v5 v5.0.4
42
+ go: extracting golang.org/x/image v0.0.0-20200430140353-33d19683fad8
43
+ go: downloading github.com/fsnotify/fsnotify v1.4.9
44
+ go: downloading golang.org/x/mod v0.2.0
45
+ go: downloading golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e
46
+ go: downloading github.com/pkg/errors v0.9.1
47
+ go: downloading github.com/Kodeworks/golang-image-ico v0.0.0-20141118225523-73f0f4cfade9
48
+ go: extracting github.com/pmezard/go-difflib v1.0.0
49
+ go: extracting github.com/godbus/dbus/v5 v5.0.4
50
+ go: extracting github.com/fsnotify/fsnotify v1.4.9
51
+ go: downloading github.com/josephspurrier/goversioninfo v0.0.0-20200309025242-14b0ab84c6ca
52
+ go: extracting github.com/pkg/errors v0.9.1
53
+ go: downloading github.com/davecgh/go-spew v1.1.1
54
+ go: extracting github.com/Kodeworks/golang-image-ico v0.0.0-20141118225523-73f0f4cfade9
55
+ go: downloading github.com/jackmordaunt/icns v0.0.0-20181231085925-4f16af745526
56
+ go: extracting github.com/go-gl/glfw/v3.3/glfw v0.0.0-20210410170116-ea3d685f79fb
57
+ go: extracting golang.org/x/mod v0.2.0
58
+ go: downloading golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
59
+ go: extracting github.com/jackmordaunt/icns v0.0.0-20181231085925-4f16af745526
60
+ go: extracting golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
61
+ go: extracting github.com/davecgh/go-spew v1.1.1
62
+ go: downloading github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
63
+ go: extracting github.com/josephspurrier/goversioninfo v0.0.0-20200309025242-14b0ab84c6ca
64
+ go: extracting github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
65
+ go: downloading github.com/akavel/rsrc v0.8.0
66
+ go: extracting github.com/go-gl/gl v0.0.0-20190320180904-bf2b1f2f34d7
67
+ go: extracting github.com/akavel/rsrc v0.8.0
68
+ go: extracting golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e
69
+ go: downloading golang.org/x/text v0.3.2
70
+ go: extracting golang.org/x/text v0.3.2
71
+ go: finding github.com/lucor/goinfo v0.0.0-20200401173949-526b5363a13a
72
+ go: finding github.com/fsnotify/fsnotify v1.4.9
73
+ go: finding github.com/godbus/dbus/v5 v5.0.4
74
+ go: finding github.com/fredbi/uri v0.0.0-20181227131451-3dcfdacbaaf3
75
+ go: finding github.com/Kodeworks/golang-image-ico v0.0.0-20141118225523-73f0f4cfade9
76
+ go: finding github.com/jackmordaunt/icns v0.0.0-20181231085925-4f16af745526
77
+ go: finding golang.org/x/sys v0.0.0-20200720211630-cb9d2d5c5666
78
+ go: finding github.com/josephspurrier/goversioninfo v0.0.0-20200309025242-14b0ab84c6ca
79
+ go: finding github.com/pkg/errors v0.9.1
80
+ go: finding golang.org/x/mod v0.2.0
81
+ go: finding github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
82
+ go: finding github.com/akavel/rsrc v0.8.0
83
+ go: finding golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
84
+ go: finding golang.org/x/tools v0.0.0-20200328031815-3db5fc6bac03
85
+ go: finding github.com/goki/freetype v0.0.0-20181231101311-fa8a33aabaff
86
+ go: finding github.com/go-gl/glfw/v3.3/glfw v0.0.0-20210410170116-ea3d685f79fb
87
+ go: finding github.com/srwiley/oksvg v0.0.0-20200311192757-870daf9aa564
88
+ go: finding github.com/go-gl/gl v0.0.0-20190320180904-bf2b1f2f34d7
89
+ go: finding github.com/srwiley/rasterx v0.0.0-20200120212402-85cb7272f5e9
90
+ go: finding golang.org/x/image v0.0.0-20200430140353-33d19683fad8
91
+ go: finding golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e
92
+ go: finding github.com/stretchr/testify v1.5.1
93
+ go: finding golang.org/x/text v0.3.2
94
+ go: finding github.com/davecgh/go-spew v1.1.1
95
+ go: finding github.com/pmezard/go-difflib v1.0.0
96
+ go: finding gopkg.in/yaml.v2 v2.2.8
97
+ go: finding github.com/fyne-io/mobile v0.1.3-0.20210412090810-650a3139866a
13
98
  ```

2

typo fix

2021/05/23 23:50

投稿

nobonobo
nobonobo

スコア3367

answer CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  その後以下の様に依存をgo-getしましょう。
8
8
  ```shell
9
- % go get fyne.io/fyne/v2
9
+ % go get fyne.io/fyne/v2/...
10
10
  # 現バージョンの出力例
11
11
  go: downloading fyne.io/fyne/v2 v2.0.3
12
12
  go get: added fyne.io/fyne/v2 v2.0.3

1

追記

2021/05/23 23:14

投稿

nobonobo
nobonobo

スコア3367

answer CHANGED
@@ -1,3 +1,13 @@
1
1
  エラーメッセージが示す通り、アプリケーションを作るときにはGoモジュールとしての宣言処理をしてgo.modファイルを作る必要があります。
2
2
 
3
- go.modファイルを生成するには「go mod init モジュール名」と言うコマンドを実行します。
3
+ go.modファイルを生成するには「go mod init モジュール名」と言うコマンドを実行します。
4
+
5
+ ## 追記
6
+
7
+ その後以下の様に依存をgo-getしましょう。
8
+ ```shell
9
+ % go get fyne.io/fyne/v2
10
+ # 現バージョンの出力例
11
+ go: downloading fyne.io/fyne/v2 v2.0.3
12
+ go get: added fyne.io/fyne/v2 v2.0.3
13
+ ```