Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
xflags
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Jira
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSS
Libraries
Go
Application
xflags
Compare revisions
v1.2.3 to v1.3.0
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
oss/libraries/go/application/xflags
Select target project
No results found
v1.3.0
Select Git revision
Branches
master
Tags
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
Swap
Target
oss/libraries/go/application/xflags
Select target project
oss/libraries/go/application/xflags
1 result
v1.2.3
Select Git revision
Branches
master
Tags
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
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (3)
refactor change func name FlagOutput() to Output()
· da41b498
Volker Schukai
authored
2 years ago
Verified
da41b498
Bump version to 1.3.0
· 75a0e840
Volker Schukai
authored
2 years ago
Verified
75a0e840
Update changelog
· 946ff092
Volker Schukai
authored
2 years ago
Verified
946ff092
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
CHANGELOG.md
+7
-0
7 additions, 0 deletions
CHANGELOG.md
README.md
+3
-0
3 additions, 0 deletions
README.md
api.go
+2
-2
2 additions, 2 deletions
api.go
api_test.go
+17
-0
17 additions, 0 deletions
api_test.go
release.json
+1
-1
1 addition, 1 deletion
release.json
with
30 additions
and
3 deletions
CHANGELOG.md
View file @
946ff092
<a
name=
"v1.3.0"
></a>
## [v1.3.0] - 2022-10-08
### Code Refactoring
-
refactor change func name FlagOutput() to Output()
<a
name=
"v1.2.3"
></a>
## [v1.2.3] - 2022-10-07
### Changes
...
...
@@ -40,6 +46,7 @@
<a
name=
"v1.0.0"
></a>
## v1.0.0 - 2022-10-04
[
v1.3.0
]:
https://gitlab.schukai.com/oss/libraries/go/application/xflags/compare/v1.2.3...v1.3.0
[
v1.2.3
]:
https://gitlab.schukai.com/oss/libraries/go/application/xflags/compare/v1.2.2...v1.2.3
[
v1.2.2
]:
https://gitlab.schukai.com/oss/libraries/go/application/xflags/compare/v1.2.1...v1.2.2
[
v1.2.1
]:
https://gitlab.schukai.com/oss/libraries/go/application/xflags/compare/v1.2.0...v1.2.1
...
...
This diff is collapsed.
Click to expand it.
README.md
View file @
946ff092
...
...
@@ -79,6 +79,9 @@ the command `serve`. Furthermore, the command has the tag `call` with
the value
`DoServe`
. The function
`DoServe`
is called when the command
`serve`
is used.
Important: The function must be exported, that means it
must start with a capital letter.
The function is called with the receiver
`*Definition`
An example for the function
`DoServe`
:
...
...
This diff is collapsed.
Click to expand it.
api.go
View file @
946ff092
...
...
@@ -34,8 +34,8 @@ func New[C any](name string, definitions C) *Settings[C] {
return
s
}
//
Flag
Output returns the writer where the flag package writes its output.
func
(
s
*
Settings
[
C
])
Flag
Output
()
string
{
// Output returns the writer where the flag package writes its output.
func
(
s
*
Settings
[
C
])
Output
()
string
{
return
s
.
flagOutput
.
(
*
bytes
.
Buffer
)
.
String
()
}
...
...
This diff is collapsed.
Click to expand it.
api_test.go
View file @
946ff092
...
...
@@ -8,6 +8,23 @@ import (
"testing"
)
func
TestUsage
(
t
*
testing
.
T
)
{
commands
:=
New
(
"root"
,
CmdTest1
{})
args
:=
[]
string
{
"-h"
}
commands
.
Parse
(
args
)
assert
.
False
(
t
,
commands
.
HasErrors
())
if
commands
.
HasErrors
()
{
t
.
Log
(
commands
.
Errors
())
}
usage
:=
commands
.
Usage
()
assert
.
NotEmpty
(
t
,
usage
)
}
func
TestNewIntWithError
(
t
*
testing
.
T
)
{
// two is not a struct
...
...
This diff is collapsed.
Click to expand it.
release.json
View file @
946ff092
{
"version"
:
"1.
2.3
"
}
{
"version"
:
"1.
3.0
"
}
This diff is collapsed.
Click to expand it.