func (self *UpdateHostGenertor) generateUpdateHostMessage() { hostInfo, err := verity.Collect() if err != nil { log.Fatalf("[update.host.generator] failed to collect host information: %s", err) } message := &Message{ Tag: self.tag, Body: hostInfo, } self.queue.Push(message) }
func main() { verity, err := verity.Collect() if err != nil { panic(err) } buf, err := json.Marshal(verity) if err != nil { panic(err) } os.Stdout.Write(buf) }