Пример #1
0
func main() {
	k := klog.NewLogger(nil, "") // Write to stdout and without prefix

	k.Infof("Hi %s.", "Susan")
	k.Warn("Oh my god, you are alive!")
	k.Error("Yes, but I will go to Mars tomorrow. So only one day with you")
	k.Fatal("Oh no, donot leave me again... faint") // Fatal will call os.Exit(1)
}
Пример #2
0
package publish

import (
	"os"
	"path/filepath"
	"strings"

	"github.com/Unknwon/cae/zip"
	"github.com/shxsun/gobuild/utils"
	"github.com/shxsun/klog"
)

var log = klog.NewLogger(os.Stdout)

type FileSet struct {
	Includes []string `yaml:"includes"`
	Excludes []string `yaml:"excludes"`
}

type BuildConfig struct {
	Framework string `yaml:"framework"`
	FileSet   `yaml:"filesets"`
}

// basic regrex match
func match(bre string, str string) bool {
	if bre == str { // FIXME: use re
		return true
	}
	return false
}