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: endpoints_test.go
    path of file: ./repos/go-zero/zrpc/resolver/internal/targets
    
    the code of the file until where you have to start completion: package targets

import (
	"net/url"
	"testing"

	"github.com/stretchr/testify/assert"
	"google.golang.org/grpc/resolver"
)

func TestGetAuthority(t *testing.T) {
	tests := []struct {
	
    
func TestGetEndpoints(t *testing.T) {
	tests := []struct {
		name string
		url  string
		want string
	}{
		{
			name: "test",
			url:  "direct:///localhost",
			want: "localhost",
		},
		{
			name: "test with port",
			url:  "direct:///localhost:8080",
			want: "localhost:8080",
		},
		{
			name: "test with multiple hosts",
			url:  "direct:///localhost,localhost",
			want: "localhost,localhost",
		},
		{
			name: "test with multiple hosts with port",
			url:  "direct:///localhost:8080,localhost:8081",
			want: "localhost:8080,localhost:8081",
		},
	}

	for _, test := range tests {
		t.Run(test.name, func(t *testing.T) {
			uri, err := url.Parse(test.url)
			assert.Nil(t, err)
			target := resolver.Target{
				URL: *uri,
			}
			assert.Equal(t, test.want, GetEndpoints(target))
		})
	}
}