mirror of
				https://github.com/containers/podman.git
				synced 2025-10-31 10:00:01 +08:00 
			
		
		
		
	 942f789a88
			
		
	
	942f789a88
	
	
	
		
			
			The new golangci-lint version 1.60.1 has problems with typecheck when linting remote files. We have certain pakcages that should never be inlcuded in remote but the typecheck tries to compile all of them but this never works and it seems to ignore the exclude files we gave it. To fix this the proper way is to mark all packages we only use locally with !remote tags. This is a bit ugly but more correct. I also moved the DecodeChanges() code around as it is called from the client so the handles package which should only be remote doesn't really fit anyway. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
		
			
				
	
	
		
			24 lines
		
	
	
		
			606 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			606 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| //go:build !remote
 | |
| 
 | |
| package libpod
 | |
| 
 | |
| import (
 | |
| 	"net/http"
 | |
| 
 | |
| 	"github.com/containers/podman/v5/libpod"
 | |
| 	"github.com/containers/podman/v5/pkg/api/handlers/utils"
 | |
| 	api "github.com/containers/podman/v5/pkg/api/types"
 | |
| 	"github.com/containers/podman/v5/pkg/domain/infra/abi"
 | |
| )
 | |
| 
 | |
| func GetInfo(w http.ResponseWriter, r *http.Request) {
 | |
| 	runtime := r.Context().Value(api.RuntimeKey).(*libpod.Runtime)
 | |
| 	containerEngine := abi.ContainerEngine{Libpod: runtime}
 | |
| 	info, err := containerEngine.Info(r.Context())
 | |
| 	if err != nil {
 | |
| 		utils.InternalServerError(w, err)
 | |
| 		return
 | |
| 	}
 | |
| 	utils.WriteResponse(w, http.StatusOK, info)
 | |
| }
 |