updated example to show off required flags
This commit is contained in:
parent
d1b8884554
commit
45610c07f4
@ -19,8 +19,7 @@ This a very simple implementation of Go-like flags in Odin
|
||||
|
||||
fleg.parse_flags()
|
||||
```
|
||||
|
||||
You can also marks flags as **required"**. These will still be parsed, however will hault the application until they are passed:
|
||||
You can also marks flags as **required**. These will still be parsed, however will hault the application until they are passed:
|
||||
|
||||
```odin
|
||||
import "fleg"
|
||||
@ -29,14 +28,14 @@ You can also marks flags as **required"**. These will still be parsed, however w
|
||||
fleg.parse_flags()
|
||||
```
|
||||
|
||||
***Supports: bool, int, string, f32***
|
||||
|
||||
And on the command line, you pass flags like so:
|
||||
|
||||
```bash
|
||||
./<program name> -isNumber=45 -isRunning=false ......
|
||||
```
|
||||
|
||||
***Supports: bool, int, string, f32 and f64***
|
||||
|
||||
## Help flag:
|
||||
|
||||
The package also contains a help context menu. This comes default and can be called like so (**Note:** You can also use "-h" or "--help"):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user