evilsocket / islazy Goto Github PK
View Code? Open in Web Editor NEWA Go library containing a set of opinionated packages, objects, helpers and functions implemented with the KISS principle in mind.
License: Other
A Go library containing a set of opinionated packages, objects, helpers and functions implemented with the KISS principle in mind.
License: Other
I'm seeing myself doing the following quite often:
log.Debug(fmt.Sprintf("Sending event %s to event chan", event))
Having something like log.Debugf
(same for other logging functions) may be nice in such cases.
I was wondering if there's any elegant way to add a title to a table without breaking any dependency :)
Hi Simone Margaritelli,
I would like to know if islazy is licensed under the terms of the GPL 3 license, strictly version 3, or can we use version 3 or any later version?
My doubt is due to the README.md displaying the message "This library was made with hearts by Simone Margaritelli and it's released under the GPL 3 license" and in the LICENSE.md I find "GPL version 3 or later".
When you quote GPL-3, is it strictly? or do you allow any later version?
Could you please clarify whether the correct license is GPL-3 or GPL-3+ (any later version) by changing either the README.md or the LICENSE.md file?
Regards,
Francisco Vilmar Cardoso Ruviaro
Running tui.Table
with a constant column in a loop screws up the column formating a bit more in each iteration:
package main
import (
"bytes"
"fmt"
"time"
"github.com/evilsocket/islazy/log"
"github.com/evilsocket/islazy/tui"
)
func main() {
columns := []string{
"A",
"B",
"C",
"D",
}
ticker := time.NewTicker(1 * time.Second)
for range ticker.C {
buf := new(bytes.Buffer)
rows := [][]string{
{fmt.Sprintf("%d", 0), fmt.Sprintf("%d", 1), fmt.Sprintf("%d", 2), fmt.Sprintf("%d", 3)},
}
tui.Table(buf, columns, rows)
log.Info("%s", buf.String())
}
}
$ go run demo.go 8.3s < Mi 13 Feb 2019 22:43:21 CET
2019-02-13 22:43:30 inf
+---+---+---+---+
| A | B | C | D |
+---+---+---+---+
| 0 | 1 | 2 | 3 |
+---+---+---+---+
2019-02-13 22:43:31 inf
+----+----+----+----+
| A | B | C | D |
+----+----+----+----+
| 0 | 1 | 2 | 3 |
+----+----+----+----+
2019-02-13 22:43:32 inf
+-----+-----+-----+-----+
| A | B | C | D |
+-----+-----+-----+-----+
| 0 | 1 | 2 | 3 |
+-----+-----+-----+-----+
2019-02-13 22:43:33 inf
+------+------+------+------+
| A | B | C | D |
+------+------+------+------+
| 0 | 1 | 2 | 3 |
+------+------+------+------+
2019-02-13 22:43:34 inf
+-------+-------+-------+-------+
| A | B | C | D |
+-------+-------+-------+-------+
| 0 | 1 | 2 | 3 |
+-------+-------+-------+-------+
If no format string is provided https://github.com/evilsocket/islazy/blob/master/log/log.go#L72 log will print with errors if the string contains %
.
A conditional formatting will prevent this bug.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.