xcaddy/cmd
Hyeon Kim (김지현) 3d8622df25
Handle replacements robustly (#69)
* Parse JSON output of 'go list'

It's more robust in this way

* Handle all possible replacements properly for runDev()

1.  Handle all possible replacements properly for runDev()

    Replacement targets are not always paths.

    Reference:
      https://pkg.go.dev/cmd/go/internal/list#pkg-variables

2.  Parse replacement info from 'go list -m -json all'

    It's more robust in this way

* Test the 'go list -m -json all' parsing logic

* Call 'go list' command only once

`go list -m -json all` contains all informations we need so we don't
need extra `go list -m -json` call.

* main_windows_test.go: Make tests for Windows

* Support Go 1.16

* Use struct instead of map[string]interface{}

* extract and unexport the `module` struct

Co-authored-by: Mohammed Al Sahaf <msaa1990@gmail.com>
2021-09-01 18:30:45 +00:00
..
xcaddy cmd: Set up main.go, similar to caddy, for retaining version info 2021-08-30 21:15:04 +03:00
main.go Handle replacements robustly (#69) 2021-09-01 18:30:45 +00:00
main_test.go cmd: Add xcaddy version command 2021-08-30 21:15:04 +03:00
main_unix_test.go Handle replacements robustly (#69) 2021-09-01 18:30:45 +00:00
main_windows_test.go Handle replacements robustly (#69) 2021-09-01 18:30:45 +00:00