log/修改 Field;
							parent
							
								
									d12ff23ff9
								
							
						
					
					
						commit
						8748299a96
					
				@ -1,7 +1,15 @@
 | 
			
		||||
package logsdk
 | 
			
		||||
 | 
			
		||||
// Field 是日志记录中的键值对
 | 
			
		||||
type Field struct {
 | 
			
		||||
// Field 返回键值对
 | 
			
		||||
func Field(key string, value any) KV {
 | 
			
		||||
	return KV{
 | 
			
		||||
		Value: value,
 | 
			
		||||
		Key:   key,
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// KV 是日志记录中的键值对
 | 
			
		||||
type KV struct {
 | 
			
		||||
	Value any    `json:"v"`
 | 
			
		||||
	Key   string `json:"k"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
					Loading…
					
					
				
		Reference in New Issue