You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: test.go
    path of file: ./repos/kubeedge/edge/test
    
    the code of the file until where you have to start completion: package test

import (
	"encoding/json"
	"io"
	"net/http"
	"time"

	v1 "k8s.io/api/core/v1"
	"k8s.io/klog/v2"

	"github.com/kubeedge/beehive/pkg/core"
	beehiveContext "github.com/kubeedge/beehive/pkg/core/context"
	"github.com/kubeedge/beehive/pkg/core/model"
	"github.com/kubeedge/kubeedge/edge/pkg/common/message"
	"github.com/kubeedge/kubeedge/edge/pkg/common/modules"
	"github.com/kubeedge/kubeedge/pkg/apis/componentconfig/edgecore/v1alpha2"
)

const (
	name            = "testManager"
	edgedEndPoint   = "http://127.0.0.1:10255"
	EdgedPodHandler = "/pods"
)

// TODO move this files into /edge/pkg/dbtest @kadisi
func Register(t *v1alpha2.DBTest) {
	core.Register(&testManager{enable: t.Enable})
}

type testManager struct {
	enable bool
}

var _ core.Module = (*testManager)(nil)

func (tm *testManager) Name() string {
	return name
}

func (
    
func GetPodListFromEdged(w http.ResponseWriter) error {
	var pods v1.PodList
	var bytes io.Reader
	client := &http.Client{}
	t := time.Now()
	req, err := http.NewRequest(http.MethodGet, edgedEndPoint+EdgedPodHandler, bytes)
	req.Header.Set("Content-Type", "application/json; charset=utf-8")
	if err != nil {
		klog.Errorf("Frame HTTP request failed: %v", err)
		return err
	}
	resp, err := client.Do(req)
	if err != nil {
		klog.Errorf("Sending HTTP request failed: %v", err)
		return err
	}
	klog.Infof("%s %s %v in %v", req.Method, req.URL, resp.Status, time.Since(t))
	defer resp.Body.Close()
	contents, err := io.ReadAll(resp.Body)
	if err != nil {
		klog.Errorf("HTTP Response reading has failed: %v", err)
		return err
	}
	err = json.Unmarshal(contents, &pods)
	if err != nil {
		klog.Errorf("Json Unmarshal has failed: %v", err)
		return err
	}
	respBody, err := json.Marshal(pods)
	if err != nil {
		klog.Errorf("Json Marshal failed: %v", err)
		return err
	}
	w.Header().Set("Content-Type", "application/json")
	w.Write(respBody)

	return nil
}