예제 #1
0
파일: top.go 프로젝트: Laller/nocrud
func burnResults(vctx iface.ViewContext, key string, b []interface{}) {
	for i, v := range b {
		if i == 0 {
			vctx.Publish(key, v)
		} else {
			vctx.Publish(key+strconv.Itoa(i), v)
		}
	}
}
예제 #2
0
// tplpath is public/default or private/127.0.0.1/default
func LoadLocStrings(f iface.FileSys, vctx iface.ViewContext, user_langs []string) (map[string]interface{}, error) {
	locfiles := CollectFromMap(vctx.Get())
	return ReadFiles(f, user_langs, locfiles)
}