mirror of
				https://github.com/containers/podman.git
				synced 2025-11-01 02:42:11 +08:00 
			
		
		
		
	 49264c7148
			
		
	
	49264c7148
	
	
	
		
			
			Changes as of 2022-04-21: - apply-podman-deltas: minor cleanup - buildah-tests.diff: deal with: . buildah #3894 (the registry one), which affected helpers.bash in a way that resulted in conflicts here; and . buildah #3917 (etchosts), which caused offset-only diffs with no conflicts - Reevaluate the bud skip list, and reenable some tests that seems to be passing now under podman: . bud with specified context ... . two tests that require a local registry (which buildah now runs) . bud with --cgroup-parent Signed-off-by: Ed Santiago <santiago@redhat.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
		
			
				
	
	
		
			48 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
| //go:build !go1.16
 | |
| // +build !go1.16
 | |
| 
 | |
| // Package gutil is a replacement for ioutil, which should not be used in new
 | |
| // code as of Go 1.16. With Go 1.15 and lower, this implementation
 | |
| // uses the ioutil functions, meaning that although Gomega is not officially
 | |
| // supported on these versions, it is still likely to work.
 | |
| package gutil
 | |
| 
 | |
| import (
 | |
| 	"io"
 | |
| 	"io/ioutil"
 | |
| )
 | |
| 
 | |
| func NopCloser(r io.Reader) io.ReadCloser {
 | |
| 	return ioutil.NopCloser(r)
 | |
| }
 | |
| 
 | |
| func ReadAll(r io.Reader) ([]byte, error) {
 | |
| 	return ioutil.ReadAll(r)
 | |
| }
 | |
| 
 | |
| func ReadDir(dirname string) ([]string, error) {
 | |
| 	files, err := ioutil.ReadDir(dirname)
 | |
| 	if err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 
 | |
| 	var names []string
 | |
| 	for _, file := range files {
 | |
| 		names = append(names, file.Name())
 | |
| 	}
 | |
| 
 | |
| 	return names, nil
 | |
| }
 | |
| 
 | |
| func ReadFile(filename string) ([]byte, error) {
 | |
| 	return ioutil.ReadFile(filename)
 | |
| }
 | |
| 
 | |
| func MkdirTemp(dir, pattern string) (string, error) {
 | |
| 	return ioutil.TempDir(dir, pattern)
 | |
| }
 | |
| 
 | |
| func WriteFile(filename string, data []byte) error {
 | |
| 	return ioutil.WriteFile(filename, data, 0644)
 | |
| }
 |