return command index in do(); add checking in peer.go; gofmt