Example #1
0
File: main.go Project: schorlet/cdc
func printBody(entry *cdc.Entry) {
	body, err := entry.Body()
	if err != nil {
		log.Fatal(err)
	}
	defer body.Close()

	io.Copy(os.Stdout, body)
}
Example #2
0
File: main.go Project: schorlet/cdc
func printHeader(entry *cdc.Entry) {
	header, err := entry.Header()
	if err != nil {
		log.Fatal(err)
	}
	for key := range header {
		fmt.Printf("%s: %s\n", key, header.Get(key))
	}
}