mirror of
				https://github.com/containers/podman.git
				synced 2025-11-04 17:07:20 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			329 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			329 B
		
	
	
	
		
			Go
		
	
	
	
	
	
//go:build !windows
 | 
						|
 | 
						|
package env
 | 
						|
 | 
						|
// ParseSlice parses the specified slice and transforms it into an environment
 | 
						|
// map.
 | 
						|
func ParseSlice(s []string) (map[string]string, error) {
 | 
						|
	env := make(map[string]string, len(s))
 | 
						|
	for _, e := range s {
 | 
						|
		if err := parseEnv(env, e); err != nil {
 | 
						|
			return nil, err
 | 
						|
		}
 | 
						|
	}
 | 
						|
	return env, nil
 | 
						|
}
 |