Skip to content

Empty list into object could be inligned #3

@finistseb

Description

@finistseb

Hello, we use descriptor in ovhdata-cli (open sourced recently),
The display of nested empty list can be confusing.

For example, this given struct

    fn create_metadata_error() -> TableMeta {
        TableMeta {
            table_name: Some("table-name".to_string()),
            status: "ERROR".to_string(),
            error: Some("Metadata were not extracted".to_string()),
            error_code: Some("404".to_string()),
            started_at: None,
            ended_at: None,
            metadata: Vec::new(),
        }
    }

Will produce the output :

Table Name: table-name
Status:     ERROR
Error:      Metadata were not extracted
Error Code: 404
Started At: ~
Ended At:   ~
Metadata:
Empty list

Empty list is interesting for display empty tables likes that:

NAME   TYPE   CARDINALITY   MIN   MAX
Empty list

But, IMO, nested list could be displayed likes that

Table Name: table-name
Status:     ERROR
Error:      Metadata were not extracted
Error Code: 404
Started At: ~
Ended At:   ~
Metadata: [~]

This library have not commit since 2 years, is this repo still maintained?
Thanks,
Sebastien

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions