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: server_test.go
    path of file: ./repos/lakeFS/pkg/httputil
    
    the code of the file until where you have to start completion: package httputil

import (
	"fmt"
	"net/http"
	"testing"
)

func TestHostSubdomainOf(t *testing.T) {
	type args struct {
		v []string
	}
	tests := []struct {
		name string
		args args
		host string
		want bool
	}{
		{name: "empty", args: args{v: []string{}}, host: "s3", want: false},
		{name: "short", args: args{v: []string{"s3.local.io"}}, host: "s3", want: false},
		{name: "short many", args: args{v: []string{"s3.local.io", "s3.dev.invalid"}}, host: "s3", want: false},
		{name: "extract", args: args{v: []string{"s3.local.io"}}, host: "s3.local.io", want: false},
		{name: "extract many", args: args{v: []string{"s3.dev.invalid", "s3.local.io"}}, host: "s3.local.io", want: false},
		{name: "no sub", args: args{v: []string{"s3.local.io"}}, host: ".s3.local.io", want: false},
		{name: "no sub many", args: args{v: []string{"s3.dev.invalid", "s3.local.io"}}, host: ".s3.local.io", want: false},
		{name: "dot sub", args: args{v: []string{"s3.local.io"}}, host: "..s3.local.io", want: false},
		{name: "dot sub many", args: args{v: []string{"s3.local
    
func TestHostMatches(t *testing.T) {
	type args struct {
		v []string
	}
	tests := []struct {
		name string
		args args
		host string
		want bool
	}{
		{name: "empty", args: args{v: []string{}}, host: "s3", want: false},
		{name: "short", args: args{v: []string{"s3.local.io"}}, host: "s3", want: false},
		{name: "short many", args: args{v: []string{"s3.local.io", "s3.dev.invalid"}}, host: "s3", want: false},
		{name: "extract", args: args{v: []string{"s3.local.io"}}, host: "s3.local.io", want: true},
		{name: "extract many", args: args{v: []string{"s3.dev.invalid", "s3.local.io", "s3.example.net"}}, host: "s3.local.io", want: true},
		{name: "subdomain", args: args{v: []string{"s3.local.io"}}, host: "sub.s3.local.io", want: false},
		{name: "subdomain many", args: args{v: []string{"s3.dev.invalid", "s3.local.io"}}, host: "sub.s3.local.io", want: false},
		{name: "empty", args: args{v: []string{"s3.local.io"}}, host: "", want: false},
		{name: "empty many", args: args{v: []string{"s3.dev.invalid", "s3.local.io"}}, host: "", want: false},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			r, err := http.NewRequest("GET", fmt.Sprintf("https://%s/", tt.host), nil)
			if err != nil {
				t.Fatal(err)
			}
			got := HostMatches(r, tt.args.v)
			if got != tt.want {
				t.Errorf("HostMatches() '%s' test with '%s' got = %t, want = %t", tt.args.v, tt.host, got, tt.want)
			}
		})
	}
}