Skip to content

Commit

Permalink
Merge pull request #4 from ipinfo/uman/network-field-when-no-field
Browse files Browse the repository at this point in the history
Always write the `network` field if no field in input.
  • Loading branch information
UmanShahzad authored Mar 14, 2022
2 parents 6d65f55 + 7404b18 commit abd2f59
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd_import.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ Options:
default: false.
--no-fields
specify that no fields exist except the implicit network field.
when enabled, --no-network has no effect; the network field is written.
default: false.
--no-network
if --fields-from-header is set, then don't write the network field, which
Expand Down Expand Up @@ -257,6 +258,7 @@ func cmdImport() error {
}
if fNoFields {
fFields = []string{}
fNoNetwork = false
} else if !fFieldsFromHdr && (fFields == nil || len(fFields) == 0) {
fFieldsFromHdr = true
}
Expand Down

0 comments on commit abd2f59

Please sign in to comment.