Skip to content

Commit

Permalink
Merge pull request #94 from ryo-arima/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
ryo-arima authored Sep 12, 2024
2 parents d93a83a + 2d44da4 commit 0799350
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
15 changes: 12 additions & 3 deletions cmd/client/root/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,25 @@ func main() {

switch role {
case "admin":
if err := exec.Command("bash", "-c", "/opt/mark1/admin-client").Run(); err != nil {
cmd := exec.Command("bash", "-c", "/opt/mark1/admin-client")
output, err := cmd.CombinedOutput()
if err != nil {
fmt.Printf("Failed to run admin-client: %v\n", err)
fmt.Printf("Output: %s\n", output)
}
case "app":
if err := exec.Command("bash", "-c", "/opt/mark1/app-client").Run(); err != nil {
cmd := exec.Command("bash", "-c", "/opt/mark1/app-client")
output, err := cmd.CombinedOutput()
if err != nil {
fmt.Printf("Failed to run app-client: %v\n", err)
fmt.Printf("Output: %s\n", output)
}
case "anonymous":
if err := exec.Command("bash", "-c", "/opt/mark1/anonymous-client").Run(); err != nil {
cmd := exec.Command("bash", "-c", "/opt/mark1/anonymous-client")
output, err := cmd.CombinedOutput()
if err != nil {
fmt.Printf("Failed to run anonymous-client: %v\n", err)
fmt.Printf("Output: %s\n", output)
}
default:
fmt.Println("Invalid role. You can specify 'admin', 'app', or 'anonymous' in MARK1_HOME_DIR/role")
Expand Down
13 changes: 13 additions & 0 deletions vendor/github.com/go-redis/redis/v8/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0799350

Please sign in to comment.