Skip to content

Commit 1c8ab32

Browse files
authored
Merge pull request #370 from devlights/devlights/command-pkg-369
Move Command interface to pkg directory
2 parents b2d810e + 37d68c6 commit 1c8ab32

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

cmd/trygolang/ifs.go

Lines changed: 0 additions & 9 deletions
This file was deleted.

cmd/trygolang/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"github.com/devlights/gomy/logops"
1010
"github.com/devlights/gomy/strops"
1111
"github.com/devlights/try-golang/internal/builder"
12+
"github.com/devlights/try-golang/pkg/command"
1213
"github.com/devlights/try-golang/pkg/mappings"
1314
)
1415

@@ -56,7 +57,7 @@ func main() {
5657

5758
defer fmt.Println("END")
5859

59-
var cmd Command
60+
var cmd command.Cmd
6061
if args.ExampleName != "" {
6162
cmd = NewRunOnceCommand(NewRunOnceArgs(args.ExampleName, mapping))
6263
} else {

pkg/command/command.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package command
2+
3+
type (
4+
// Cmd -- 何かを実行するコマンドを表します.
5+
Cmd interface {
6+
// Run -- 実行します.
7+
Run() error
8+
}
9+
)

0 commit comments

Comments
 (0)