xianlubird / mydocker

<<自己动手写docker>> 源码

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

undefined: initCommand & runCommand

eric-chao opened this issue · comments

code-2.1

OS: centos 7.4

Linux Core: 3.10.0-693.el7.x86_64

Golang Version: go1.8.3 linux/amd64

command: go run main.go.

ERROR:

command-line-arguments

./main.go:22: undefined: initCommand
./main.go:23: undefined: runCommand

After upgrade Linux Core, also meet the same error.:

code-2.1

OS: centos 7.5

Linux Core: 4.16.13-1.el7.elrepo.x86_64

Golang Version: go1.9.4 linux/amd64

The initCommand and runCommand been defined in main_command.go. You should use go run *.go to run the package. Not just go run main.go.