Skip to content
Snippets Groups Projects
Commit 93f48c32 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

doc

parent f9c0f45a
No related branches found
No related tags found
No related merge requests found
......@@ -72,7 +72,7 @@ The following tags are supported:
The functions are called up with a receiver. The receiver is the
configuration. The function must have the following signature:
`func (d *Definition) DoServe(s *setting[Definition])`
`func (d *Definition) <name> (s *setting[Definition])`
Let's assume we have the above definition. The Property `Serve` contains
the command `serve`. Furthermore, the command has the tag `call` with
......@@ -108,7 +108,13 @@ definition.
A good choice for the name is the argument `os.Args[0]`.
```go
setting := New(os.Args[0], Definition{})
// define instance
var instance *xflags.Settings[Definition]
func Execute() {
instance := xflags.New(os.Args[0], Definition{})
if instance.HasErrors() {
// ...
```
### Parse
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment