Skip to content

Commit 3d878e8

Browse files
authored
Merge pull request #398 from devlights/rename-tutorial-dir
Rename internal/turorial to internal/gotour
2 parents abbe6dc + 63dbb76 commit 3d878e8

33 files changed

+110
-110
lines changed

internal/builder/builder.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"github.com/devlights/try-golang/internal/effectivego"
55
"github.com/devlights/try-golang/internal/examples/advanced"
66
"github.com/devlights/try-golang/internal/examples/basic"
7-
"github.com/devlights/try-golang/internal/tutorial"
7+
"github.com/devlights/try-golang/internal/gotour"
88
"github.com/devlights/try-golang/pkg/mappings"
99
)
1010

@@ -16,7 +16,7 @@ func BuildMappings() mappings.ExampleMapping {
1616
advanced.NewRegister(),
1717
basic.NewRegister(),
1818
effectivego.NewRegister(),
19-
tutorial.NewRegister(),
19+
gotour.NewRegister(),
2020
)
2121

2222
return m
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Package tutorial -- Tour of Go (https://tour.golang.org/) の サンプルが配置されているパッケージです。
2+
Package gotour -- Tour of Go (https://tour.golang.org/) の サンプルが配置されているパッケージです。
33
44
Go の プログラムは、パッケージで構成される。
55
規約により、パッケージ名はimportパスの最後の要素の名前となる。
@@ -19,4 +19,4 @@ https://blog.golang.org/godoc-documenting-go-code
1919
https://qiita.com/lufia/items/97acb391c26f967048f1
2020
https://qiita.com/shibukawa/items/8c70fdd1972fad76a5ce
2121
*/
22-
package tutorial
22+
package gotour

internal/gotour/examples.go

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
package gotour
2+
3+
import (
4+
"github.com/devlights/try-golang/internal/gotour/gotour01"
5+
"github.com/devlights/try-golang/internal/gotour/gotour02"
6+
"github.com/devlights/try-golang/internal/gotour/gotour03"
7+
"github.com/devlights/try-golang/internal/gotour/gotour04"
8+
"github.com/devlights/try-golang/internal/gotour/gotour05"
9+
"github.com/devlights/try-golang/internal/gotour/gotour06"
10+
"github.com/devlights/try-golang/internal/gotour/gotour07"
11+
"github.com/devlights/try-golang/internal/gotour/gotour08"
12+
"github.com/devlights/try-golang/internal/gotour/gotour09"
13+
"github.com/devlights/try-golang/internal/gotour/gotour10"
14+
"github.com/devlights/try-golang/internal/gotour/gotour11"
15+
"github.com/devlights/try-golang/internal/gotour/gotour12"
16+
"github.com/devlights/try-golang/internal/gotour/gotour13"
17+
"github.com/devlights/try-golang/internal/gotour/gotour14"
18+
"github.com/devlights/try-golang/internal/gotour/gotour15"
19+
"github.com/devlights/try-golang/internal/gotour/gotour16"
20+
"github.com/devlights/try-golang/internal/gotour/gotour17"
21+
"github.com/devlights/try-golang/internal/gotour/gotour18"
22+
"github.com/devlights/try-golang/internal/gotour/gotour19"
23+
"github.com/devlights/try-golang/internal/gotour/gotour20"
24+
"github.com/devlights/try-golang/internal/gotour/gotour21"
25+
"github.com/devlights/try-golang/internal/gotour/gotour22"
26+
"github.com/devlights/try-golang/internal/gotour/gotour23"
27+
"github.com/devlights/try-golang/internal/gotour/gotour24"
28+
"github.com/devlights/try-golang/internal/gotour/gotour25"
29+
"github.com/devlights/try-golang/internal/gotour/gotour26"
30+
"github.com/devlights/try-golang/internal/gotour/gotour27"
31+
"github.com/devlights/try-golang/internal/gotour/gotour28"
32+
"github.com/devlights/try-golang/internal/gotour/gotour29"
33+
"github.com/devlights/try-golang/pkg/mappings"
34+
)
35+
36+
type (
37+
gotourExampleRegister struct{}
38+
)
39+
40+
// NewRegister は、gotour パッケージ用の lib.Register を返します.
41+
func NewRegister() mappings.Register {
42+
r := new(gotourExampleRegister)
43+
return r
44+
}
45+
46+
// Regist は、gotour パッケージ配下に存在するサンプルを登録します.
47+
func (r *gotourExampleRegister) Regist(m mappings.ExampleMapping) {
48+
m["gotour_helloworld"] = gotour01.HelloWorld
49+
m["gotour_import"] = gotour02.Import
50+
m["gotour_scope"] = gotour03.Scope
51+
m["gotour_functions"] = gotour04.Functions
52+
m["gotour_basictypes"] = gotour05.BasicTypes
53+
m["gotour_zerovalue"] = gotour06.ZeroValue
54+
m["gotour_typeconvert_basictypes"] = gotour07.TypeConvertBasicTypes
55+
m["gotour_const"] = gotour08.Constant
56+
m["gotour_forloop"] = gotour09.ForLoop
57+
m["gotour_if"] = gotour10.If
58+
m["gotour_switch"] = gotour11.Switch
59+
m["gotour_defer"] = gotour12.Defer
60+
m["gotour_pointer"] = gotour13.Pointer
61+
m["gotour_struct"] = gotour14.Struct
62+
m["gotour_array"] = gotour15.Array
63+
m["gotour_slice"] = gotour16.Slice
64+
m["gotour_map"] = gotour17.Map
65+
m["gotour_method"] = gotour18.Method
66+
m["gotour_interface"] = gotour19.Interface
67+
m["gotour_empty_interface"] = gotour20.EmptyInterface
68+
m["gotour_type_assertion"] = gotour21.TypeAssertion
69+
m["gotour_type_switch"] = gotour22.TypeSwitch
70+
m["gotour_stringer"] = gotour23.Stringer
71+
m["gotour_error"] = gotour24.Error
72+
m["gotour_reader"] = gotour25.Reader
73+
m["gotour_goroutine"] = gotour26.Goroutine
74+
m["gotour_channels"] = gotour27.Channels
75+
m["gotour_select"] = gotour28.Select
76+
m["gotour_mutex"] = gotour29.Mutex
77+
}

internal/tutorial/tutorial01/tutorial_gotour_01_helloworld.go renamed to internal/gotour/gotour01/tutorial_gotour_01_helloworld.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package tutorial01
1+
package gotour01
22

33
import (
44
"fmt"

internal/tutorial/tutorial02/tutorial_gotour_02_import.go renamed to internal/gotour/gotour02/tutorial_gotour_02_import.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package tutorial02
1+
package gotour02
22

33
// 利用するパッケージのimportを記載する。
44
// 複数のimportがある場合は、以下のようにグループ化して記述することができる。

internal/tutorial/tutorial03/tutorial_gotour_03_scope.go renamed to internal/gotour/gotour03/tutorial_gotour_03_scope.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package tutorial03
1+
package gotour03
22

33
import "fmt"
44

internal/tutorial/tutorial04/tutorial_gotour_04_functions.go renamed to internal/gotour/gotour04/tutorial_gotour_04_functions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package tutorial04
1+
package gotour04
22

33
import "fmt"
44

internal/tutorial/tutorial05/tutorial_gotour_05_basictypes.go renamed to internal/gotour/gotour05/tutorial_gotour_05_basictypes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package tutorial05
1+
package gotour05
22

33
import "fmt"
44

internal/tutorial/tutorial06/tutorial_gotour_06_zerovalue.go renamed to internal/gotour/gotour06/tutorial_gotour_06_zerovalue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package tutorial06
1+
package gotour06
22

33
import (
44
"fmt"

internal/tutorial/tutorial07/tutorial_gotour_07_typeconvert_basictypes.go renamed to internal/gotour/gotour07/tutorial_gotour_07_typeconvert_basictypes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package tutorial07
1+
package gotour07
22

33
import "fmt"
44

0 commit comments

Comments
 (0)