![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
github.com/scylladb/termtables
A Go port of the Ruby library terminal-tables for fast and simple ASCII table generation.
go get github.com/apcera/termtables
http://godoc.org/github.com/apcera/termtables
--markdown
— output a markdown table, e.g. apc app list --markdown
--html
— output an html table, e.g. apc app list --html
--ascii
— output an ascii table, e.g. apc app list --ascii
package main
import (
"fmt"
"github.com/apcera/termtables"
)
func main() {
table := termtables.CreateTable()
table.AddHeaders("Name", "Age")
table.AddRow("John", "30")
table.AddRow("Sam", 18)
table.AddRow("Julie", 20.14)
fmt.Println(table.Render())
}
Result:
+-------+-------+
| Name | Age |
+-------+-------+
| John | 30 |
| Sam | 18 |
| Julie | 20.14 |
+-------+-------+
The package function-call EnableUTF8()
will cause any tables created after
that point to use Unicode box-drawing characters for the table lines.
Calling EnableUTF8PerLocale()
uses the C library's locale functionality to
determine if the current locale environment variables say that the current
character map is UTF-8. If, and only if, so, then EnableUTF8()
will be
called.
Calling SetModeHTML(true)
will cause any tables created after that point
to be emitted in HTML, while SetModeMarkdown(true)
will trigger Markdown.
Neither should result in changes to later API to get the different results;
the primary intended use-case is extracting the same table, but for
documentation.
The table method .AddSeparator()
inserts a rule line in the output. This
only applies in normal terminal output mode.
The table method .AddTitle()
adds a title to the table; in terminal output,
this is an initial row; in HTML, it's a caption. In Markdown, it's a line of
text before the table, prefixed by Table:
.
The table method .SetAlign()
takes an alignment and a column number
(indexing starts at 1) and changes all current cells in that column to have
the given alignment. It does not change the alignment of cells added to the
table after this call. Alignment is only stored on a per-cell basis.
Normal output:
.SetAlign()
does not affect headers.Markdown output mode:
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.