mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 03:33:56 +00:00
contrib/podex: remove logging
This commit is contained in:
parent
49776d4d05
commit
686b187067
@ -28,11 +28,9 @@ limitations under the License.
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
@ -215,11 +213,8 @@ func getImageMetadata(host, namespace, repo, tag string) (*imageMetadata, error)
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error getting json for image %q: %v", imageID, err)
|
return nil, fmt.Errorf("error getting json for image %q: %v", imageID, err)
|
||||||
}
|
}
|
||||||
data, _ := ioutil.ReadAll(resp.Body)
|
|
||||||
buf := bytes.NewBuffer(data)
|
|
||||||
log.Print(string(data))
|
|
||||||
var image imageMetadata
|
var image imageMetadata
|
||||||
if err := json.NewDecoder(buf).Decode(&image); err != nil {
|
if err := json.NewDecoder(resp.Body).Decode(&image); err != nil {
|
||||||
return nil, fmt.Errorf("error decoding image %q metadata: %v", imageID, err)
|
return nil, fmt.Errorf("error decoding image %q metadata: %v", imageID, err)
|
||||||
}
|
}
|
||||||
return &image, nil
|
return &image, nil
|
||||||
|
Loading…
Reference in New Issue
Block a user