Пример #1
0
func (t *Top) Get(ret []interface{}, files []string) error {
	ran := verbinfo.NewRanalyzer(ret)
	if ran.HadError() {
		return display.New(t.ctx).Error(ran.Error())
	}
	burnResults(t.ctx.ViewContext(), "main", ran.NonErrors())
	return display.New(t.ctx).Do(files)
}
Пример #2
0
func (t *Top) Post(ret []interface{}, verb string) error {
	ran := verbinfo.NewRanalyzer(ret)
	var err error
	if ran.HadError() {
		err = ran.Error()
	}
	t.actionResponse(err, verb)
	return nil
}