Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • master
  • v1.0.0
  • v1.1.0
  • v1.1.1
  • v1.10.0
  • v1.10.1
  • v1.10.2
  • v1.11.0
  • v1.12.0
  • v1.13.0
  • v1.13.1
  • v1.13.2
  • v1.14.0
  • v1.15.0
  • v1.16.0
  • v1.16.1
  • v1.16.2
  • v1.16.3
  • v1.16.4
  • v1.16.5
  • v1.2.0
  • v1.2.1
  • v1.2.2
  • v1.2.3
  • v1.3.0
  • v1.3.1
  • v1.4.0
  • v1.5.0
  • v1.6.0
  • v1.7.0
  • v1.8.0
  • v1.8.1
  • v1.8.2
  • v1.8.3
  • v1.9.0
35 results

Target

Select target project
  • oss/libraries/go/application/xflags
1 result
Select Git revision
  • master
  • v1.0.0
  • v1.1.0
  • v1.1.1
  • v1.10.0
  • v1.10.1
  • v1.10.2
  • v1.11.0
  • v1.12.0
  • v1.13.0
  • v1.13.1
  • v1.13.2
  • v1.14.0
  • v1.15.0
  • v1.16.0
  • v1.16.1
  • v1.16.2
  • v1.16.3
  • v1.16.4
  • v1.16.5
  • v1.2.0
  • v1.2.1
  • v1.2.2
  • v1.2.3
  • v1.3.0
  • v1.3.1
  • v1.4.0
  • v1.5.0
  • v1.6.0
  • v1.7.0
  • v1.8.0
  • v1.8.1
  • v1.8.2
  • v1.8.3
  • v1.9.0
35 results
Show changes
Commits on Source (3)
<a name="v1.6.0"></a>
## [v1.6.0] - 2022-10-13
### Code Refactoring
- refactor the execute function, the execute function should not print messages
<a name="v1.5.0"></a>
## [v1.5.0] - 2022-10-13
### Add Features
......@@ -68,6 +74,7 @@
<a name="v1.0.0"></a>
## v1.0.0 - 2022-10-04
[v1.6.0]: https://gitlab.schukai.com/oss/libraries/go/application/xflags/compare/v1.5.0...v1.6.0
[v1.5.0]: https://gitlab.schukai.com/oss/libraries/go/application/xflags/compare/v1.4.0...v1.5.0
[v1.4.0]: https://gitlab.schukai.com/oss/libraries/go/application/xflags/compare/v1.3.1...v1.4.0
[v1.3.1]: https://gitlab.schukai.com/oss/libraries/go/application/xflags/compare/v1.3.0...v1.3.1
......
......@@ -14,32 +14,14 @@ import (
// ExecuteWithShadow executes the command line arguments and calls the functions.
func ExecuteWithShadow[C any, D any](cmd C, cnf D) *Settings[C] {
s := execute(cmd, cnf, os.Args[0], os.Args[1:])
if s.HasErrors() {
for _, e := range s.Errors() {
fmt.Println(e)
}
}
return s
return execute(cmd, cnf, os.Args[0], os.Args[1:])
}
type noShadow struct{}
// Execute executes the command line arguments and calls the functions.
func Execute[C any](cmd C) *Settings[C] {
s := execute(cmd, noShadow{}, os.Args[0], os.Args[1:])
if s.HasErrors() {
for _, e := range s.Errors() {
fmt.Println(e)
}
}
if s.hint != "" {
fmt.Println(s.hint)
}
return s
return execute(cmd, noShadow{}, os.Args[0], os.Args[1:])
}
func (s *Settings[C]) PrintFlagOutput() {
......
{"version":"1.5.0"}
{"version":"1.6.0"}