mirror of
				https://github.com/kata-containers/kata-containers.git
				synced 2025-10-31 01:13:02 +00:00 
			
		
		
		
	to the kata-containers repo under the src/tools/log-parser folder and vendor the modules Fixes: #4100 Signed-off-by: Snir Sheriber <ssheribe@redhat.com>
		
			
				
	
	
		
			29 lines
		
	
	
		
			460 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			460 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| //
 | |
| // Copyright (c) 2018 Intel Corporation
 | |
| //
 | |
| // SPDX-License-Identifier: Apache-2.0
 | |
| //
 | |
| 
 | |
| package main
 | |
| 
 | |
| import (
 | |
| 	"os"
 | |
| 
 | |
| 	"github.com/BurntSushi/toml"
 | |
| )
 | |
| 
 | |
| type displayTOML struct {
 | |
| }
 | |
| 
 | |
| func (d *displayTOML) Display(entries *LogEntries, fieldNames []string, file *os.File) error {
 | |
| 	encoder := toml.NewEncoder(file)
 | |
| 
 | |
| 	encoder.Indent = displayIndentValue
 | |
| 
 | |
| 	if err := addCommentHeader(fieldNames, file); err != nil {
 | |
| 		return err
 | |
| 	}
 | |
| 
 | |
| 	return encoder.Encode(entries)
 | |
| }
 |