[chore] Document ToStringMap behavior on values with multiple representations (#13061)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Documents the behavior of `ToStringMap` when there are multiple representations available
This commit is contained in:
		
							parent
							
								
									54ae936973
								
							
						
					
					
						commit
						a80754f55f
					
				| 
						 | 
				
			
			@ -216,7 +216,12 @@ func (l *Conf) toStringMapWithExpand() map[string]any {
 | 
			
		|||
	return m
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ToStringMap creates a map[string]any from a Parser.
 | 
			
		||||
// ToStringMap creates a map[string]any from a Conf.
 | 
			
		||||
// Values with multiple representations
 | 
			
		||||
// are normalized with the YAML parsed representation.
 | 
			
		||||
//
 | 
			
		||||
// For example, for a Conf created from `foo: ${env:FOO}` and `FOO=123`
 | 
			
		||||
// ToStringMap will return `map[string]any{"foo": 123}`.
 | 
			
		||||
func (l *Conf) ToStringMap() map[string]any {
 | 
			
		||||
	return sanitize(l.toStringMapWithExpand()).(map[string]any)
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue