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

cmd/gf: gf run how to exclude dir or file ? #3582

Closed
niluan304 opened this issue May 15, 2024 · 2 comments
Closed

cmd/gf: gf run how to exclude dir or file ? #3582

niluan304 opened this issue May 15, 2024 · 2 comments
Labels

Comments

@niluan304
Copy link
Contributor

What do you want to ask?

I have a project that use gin-swagger, so it will generate docs/docs.go, and I use command gf run main.go .... to implement hot compile.

I want to exclude docs/*, how can I do ?

not found, after reading manual:

gf run -h
USAGE
    gf run FILE [OPTION]

ARGUMENT
    FILE    building file path.

OPTION
    -p, --path         output directory path for built binary file. it's "manifest/output" in default
    -e, --extra        the same options as "go run"/"go build" except some options as follows defined
    -a, --args         custom arguments for your process
    -w, --watchPaths   watch additional paths for live reload, separated by ",". i.e. "manifest/config/*.yaml"
    -h, --help         more information about this command

EXAMPLE
    gf run main.go
    gf run main.go --args "server -p 8080"
    gf run main.go -mod=vendor
    gf run main.go -w "manifest/config/*.yaml"

DESCRIPTION
    The "run" command is used for running go codes with hot-compiled-like feature,
    which compiles and runs the go codes asynchronously when codes change.
@hailaz
Copy link
Member

hailaz commented May 22, 2024

目前只能使用指定目录的方式--watchPaths,暂时没有排除的方式

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Currently, you can only use --watchPaths to specify the directory, and there is no way to exclude it for the time being.

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

No branches or pull requests

3 participants