
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
github.com/Modood/table
Advanced tools
Produces a string that represents slice of structs data in a text table, inspired by gajus/table.
Features:
table.(Thanks @skyfireitdiy)$ go get github.com/modood/table
package main
import (
"github.com/modood/table"
)
type House struct {
Name string `table:"Name"`
Sigil string
Motto string
}
func main() {
hs := []House{
{"Stark", "direwolf", "Winter is coming"},
{"Targaryen", "dragon", "Fire and Blood"},
{"Lannister", "lion", "Hear Me Roar"},
}
// Output to stdout
table.Output(hs)
// Or just return table string and then do something
s := table.Table(hs)
_ = s
}
output:
┌───────────┬──────────┬──────────────────┐
│ Name │ Sigil │ Motto │
├───────────┼──────────┼──────────────────┤
│ Stark │ direwolf │ Winter is coming │
│ Targaryen │ dragon │ Fire and Blood │
│ Lannister │ lion │ Hear Me Roar │
└───────────┴──────────┴──────────────────┘
func Output(slice interface{})
formats slice of structs data and writes to standard output.(Using box drawing characters)
func OutputA(slice interface{})
formats slice of structs data and writes to standard output.(Using standard ascii characters)
func Table(slice interface{}) string
formats slice of structs data and returns the resulting string.(Using box drawing characters)
func AsciiTable(slice interface{}) string
formats slice of structs data and returns the resulting string.(Using standard ascii characters)
compare box drawing characters with standard ascii characters
box drawing:
┌───────────┬──────────┬──────────────────┐
│ Name │ Sigil │ Motto │
├───────────┼──────────┼──────────────────┤
│ Stark │ direwolf │ Winter is coming │
│ Targaryen │ dragon │ Fire and Blood │
│ Lannister │ lion │ Hear Me Roar │
└───────────┴──────────┴──────────────────┘
standard ascii:
+-----------+----------+------------------+
| Name | Sigil | Motto |
+-----------+----------+------------------+
| Stark | direwolf | Winter is coming |
| Targaryen | dragon | Fire and Blood |
| Lannister | lion | Hear Me Roar |
+-----------+----------+------------------+
git checkout -b my-new-feature)git commit -am 'Add some feature')git push origin my-new-feature)this repo is released under the MIT License.
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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.