Esempio n. 1
0
func main() {
	log.Out("Hello, how are you?")
	log.Err("Ok, and you?")
	a := log.New("I'm %s, %s.\n")
	b := log.New("%s are %s!\n")
	a.Out("fine", "thank you")
	b.Err("You", "welcomed")
	b.Err("We", "good")
}
Esempio n. 2
0
func play() {
	if date != "" {
		f := log.New("Date \"%s\" get me \"%v\".\n")
		n, e := jd.ToNumber(date)
		if e != nil {
			f.Out(date, e)
		} else {
			f.Out(date, n)
		}
	}
}
Esempio n. 3
0
  --month=INT         [default: 1]
  --quarter=INT       [default: 2]
  --year1=INT         [default: 4]
  --year2=INT         [default: 5]
  --year3=INT         [default: 4]
  --year4=INT         [default: 2]
  --year5=INT         [default: 1]
  --adj               Adjust for dividends.
  -V --verbose
  -T --trace
  -h --help           Show help.
  -v --version        Show version.`
}

// Aliases
var lg, ln, pln = log.Err, log.New("%s\t%.4f\n").Err, log.New("%s\t%.4f\n").Out

// Constants
const minHistory = 252
const week, month, quarter, year, bi, tri, quad, quint, level = 0, 1, 2, 3, 4, 5, 6, 7, 8

// Global Objects
var threads = count.New(4)
var scores = make(map[string]float64)
var scores_mutex = &sync.Mutex{}

// Allocated
var multiple = make([]float64, 9)
var number = make([]int, 8)

// Configurable