Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

### Work in progress

- POSIX-compliant flags feature is partial. Please see [issue #3](https://github.com/joseluisq/cline/issues/3)
- POSIX-compliant flags support is partial. Please see [issue #3](https://github.com/joseluisq/cline/issues/3)
- Subcommands are not supported yet.

## Usage
Expand Down
3 changes: 3 additions & 0 deletions cline.go
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
// Package cline provides command line interface utilities.
// It includes application and command handling, flag parsing, and output formatting.
// Additional functionalities can be found in sub-packages.
package cline
24 changes: 12 additions & 12 deletions flag/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ func TestFlagInt_init(t *testing.T) {
fields fields
}{
{
name: "initialize FlagInt by default value",
name: "should initialize FlagInt by default value",
fields: fields{
Name: "a",
Value: 2,
FlagValue: "2",
},
},
{
name: "initialize FlagInt by env value",
name: "should initialize FlagInt by env value",
fields: fields{
Name: "b",
Value: 1,
Expand All @@ -44,7 +44,7 @@ func TestFlagInt_init(t *testing.T) {
},
},
{
name: "initialize FlagInt with wrong env value",
name: "should initialize FlagInt with wrong env value",
fields: fields{
Name: "b",
Aliases: []string{"x", "y"},
Expand Down Expand Up @@ -94,23 +94,23 @@ func TestFlagBool_init(t *testing.T) {
fields fields
}{
{
name: "initialize FlagBool by default value",
name: "should initialize FlagBool by default value",
fields: fields{
Name: "a",
Value: true,
FlagValue: "true",
},
},
{
name: "initialize FlagBool by env value",
name: "should initialize FlagBool by env value",
fields: fields{
Name: "b",
EnvVar: "ENV_BOOL_VAR_OK",
FlagValue: "true",
},
},
{
name: "initialize FlagBool with wrong env value",
name: "should initialize FlagBool with wrong env value",
fields: fields{
Name: "b",
EnvVar: "ENV_BOOL_VAR_ERR",
Expand Down Expand Up @@ -158,23 +158,23 @@ func TestFlagString_init(t *testing.T) {
fields fields
}{
{
name: "initialize FlagString by default value",
name: "should initialize FlagString by default value",
fields: fields{
Name: "a",
Value: "str",
FlagValue: "str",
},
},
{
name: "initialize FlagString by env value",
name: "should initialize FlagString by env value",
fields: fields{
Name: "b",
EnvVar: "ENV_STRING_VAR_OK",
FlagValue: "str",
},
},
{
name: "initialize FlagString with wrong env value",
name: "should initialize FlagString with wrong env value",
fields: fields{
Name: "b",
EnvVar: "ENV_STRING_VAR_ERR",
Expand Down Expand Up @@ -221,21 +221,21 @@ func TestFlagStringSlice_init(t *testing.T) {
fields fields
}{
{
name: "initialize FlagString by default value",
name: "should initialize FlagString by default value",
fields: fields{
Name: "a",
},
},
{
name: "initialize FlagString by env value",
name: "should initialize FlagString by env value",
fields: fields{
Name: "b",
EnvVar: "ENV_STRING_SLICE_VAR_OK",
FlagValue: flag.Value("A,b,C,d,E"),
},
},
{
name: "initialize FlagString with wrong env value",
name: "should initialize FlagString with wrong env value",
fields: fields{
Name: "b",
EnvVar: "ENV_STRING_SLICE_VAR_ERR",
Expand Down
Loading
Loading