Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arguments in front of go run -some argument main.go #77

Open
rizaldirnm opened this issue Sep 21, 2022 · 3 comments
Open

Arguments in front of go run -some argument main.go #77

rizaldirnm opened this issue Sep 21, 2022 · 3 comments

Comments

@rizaldirnm
Copy link

Hii there is any configuration if I want to execute code something like

go run -tags dynamic main.go

NOT

go run main.go -tags dynamic

my current project.json

...
    "arm_serve": {
      "executor": "@nx-go/nx-go:serve",
      "options": {
        "main": "apps/svc-auth/cmd/main.go",
        "arguments": [
          "-tags dynamic"
        ]
      }
    }
...

The executor would execute go run cmd/main.go -tags dynamic, but what I want is go run -tags dynamic cmd/main.go

Thank you in advance!

@adlion
Copy link

adlion commented Nov 5, 2022

Is this related to this package.

In my understanding if you do not use nx or npm to run you program than there is nothing that can be implemented in here.

@rizaldirnm
Copy link
Author

I expect to use nx arm_serve {GO_APP}, so I ask maybe this package would be able to do it(?)
For now I run my app using navite go run.

@meDavidNS
Copy link

I think you can manipulate the main option

    "arm_serve": {
      "executor": "@nx-go/nx-go:serve",
      "options": {
        "main": "-tags dynamic cmd/main.go"
      }
    }
...```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants