Skip to content

feat(table): add method to check if the table is empty#29

Merged
owenrumney merged 1 commit into
aquasecurity:mainfrom
ajunior:feat-table-isempty
Apr 28, 2025
Merged

feat(table): add method to check if the table is empty#29
owenrumney merged 1 commit into
aquasecurity:mainfrom
ajunior:feat-table-isempty

Conversation

@ajunior
Copy link
Copy Markdown
Contributor

@ajunior ajunior commented Apr 19, 2025

Add the public method IsEmpty() to check if the table has no data.

Example:

t := table.New(os.Stdout)
t.SetHeaders("Key", "Value")
t.AddRow(key, value)

if t.IsEmpty() {
    fmt.Println("No records to show")
} else {
    t.Render()
}

This PR resolves the issue #28.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 19, 2025

CLA assistant check
All committers have signed the CLA.

@owenrumney
Copy link
Copy Markdown
Contributor

LGTM, thanks @ajunior

@owenrumney owenrumney merged commit 0852ecf into aquasecurity:main Apr 28, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants