LinuxSuRen / LinuxSuRen/api-testing
Add a flag to enable/disable reload mock config automatically
@yuluo-yx がすでに取り組んでいます。
2024年5月1日 から。
- 主要言語
- Go
- スター
- 369
- フォーク
- 67
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
The [Mock Server](https://github.com/LinuxSuRen/api-testing/blob/ffac34fd9dc373bb5a2c7b56f54fae2efd52ebf4/cmd/mock.go) can only read the config at the startup stage. Users need to restart it if they modified the config file content.
## Solution
Support to watch the changes of the mock config file. And provide a flag to enable or disable this feature. The usage might be:
```shell
atest mock --files demo-server.yaml --auto-reload [true|false]
```
And I prefer setting the flag value `--auto-reload` to be `false`.
## References
* https://medium.com/@skdomino/watch-this-file-watching-in-go-5b5a247cf71f
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
評価
この issue はまだ評価されていません。