add stdlib package with readme

This commit is contained in:
Aidan 2020-06-21 11:11:57 -07:00
parent c40aea7326
commit 0b3bac7bca
No known key found for this signature in database
GPG key ID: 327711E983899316
9 changed files with 123 additions and 47 deletions

View file

@ -27,16 +27,16 @@ const (
INFO int = 2
)
var logLevel int
var logLevel int64
func SetLogLvl(lvl int) {
func SetLogLvl(lvl int64) {
if lvl < 4 && lvl > 0 {
logLevel = lvl
}
}
func Log(lvl int, msg, context string) {
if lvl > logLevel {
if int64(lvl) > logLevel {
return
}