Skip to content

Commit 9d75b75

Browse files
authored
Merge pull request #693 from devlights:add-result-in-example
Add result in examples (examples/basic/comments)
2 parents 1636177 + ee7c807 commit 9d75b75

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

examples/basic/comments/comments_basic.go

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,43 @@ func Basic() error
5959
fmt.Print(goDocOutput)
6060

6161
return nil
62+
63+
/*
64+
$ task
65+
task: [build] go build .
66+
task: [run] ./try-golang -onetime
67+
68+
ENTER EXAMPLE NAME: comment_basic_usage
69+
70+
[Name] "comment_basic_usage"
71+
72+
package comments // import "github.com/devlights/try-golang/basic/comments"
73+
74+
GO言語のコメントスタイルについてのサンプルがあるパッケージです
75+
76+
GO言語のコメントスタイルについては以下を参照.
77+
78+
- http://bit.ly/2HS4sg4
79+
80+
スラッシュとアスタリスクを利用するコメントは「パッケージ用」
81+
82+
ダブルスラッシュを利用するコメントは「通常用、または、関数説明など」
83+
84+
- 全てのパッケージは、パッケージコメントを持つべきである。
85+
86+
(Every package should have a package comments)
87+
88+
- 関数などのドキュメントコメント(doc comments) は、そのアイテムの名前から始める。
89+
90+
(every doc comments begins with the name of the item it describes)
91+
92+
FUNCTIONS
93+
94+
func Basic() error
95+
Basic Basic は、GO言語のコメントスタイルについてのサンプルです.
96+
97+
98+
[Elapsed] 26.48µs
99+
*/
100+
62101
}

0 commit comments

Comments
 (0)