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

import (
	"testing"

	"gotest.tools/assert"
)

func TestGetRegistryFromImageName(t *testing.T) {
	//Test with official repo
	reg, err := GetRegistryFromImageName("mysql")
	if err != nil {
		t.Fatalf("Error calling GetRegistryFromImageName: %v", err)
	}
	assert.Equal(t, "", reg, "Official repo can't be detected")

	//Test with unofficial repo
	reg, err = GetRegistryFromImageName("reg.example.com/foobar")
	if err != nil {
		t.Fatalf("Error calling GetRegistryFromImageName: %v", err)
	}
	assert.Equal(t, "reg.example.com", reg, "Unofficial repo can't be dete
    
func TestGetRegistryFromImageName(t *testing.T) {
	//Test with official repo
	reg, err := GetRegistryFromImageName("mysql")
	if err != nil {
		t.Fatalf("Error calling GetRegistryFromImageName: %v", err)
	}
	assert.Equal(t, "", reg, "Official repo can't be detected")

	//Test with unofficial repo
	reg, err = GetRegistryFromImageName("reg.example.com/foobar")
	if err != nil {
		t.Fatalf("Error calling GetRegistryFromImageName: %v", err)
	}
	assert.Equal(t, "reg.example.com", reg, "Unofficial repo can't be detected")

	//Test with invalid
	_, err = GetRegistryFromImageName("")
	if err == nil {
		t.Fatalf("No Error calling GetRegistryFromImageName with empty image name")
	}
}