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: manager_test.go
    path of file: ./repos/harbor/src/pkg/cached
    
    the code of the file until where you have to start completion: // Copyright Project Harbor Authors
    
func TestObjectKey(t *testing.T) {
	ok := NewObjectKey("artifact")
	// valid case
	s, err := ok.Format("id", 100, "digest", "9834876dcfb05cb167a5c24953eba58c4ac89b1adf57f28f2f9d09af107ee8f0")
	assert.NoError(t, err, "format should not error")
	assert.Equal(t, "artifact:id:100:digest:9834876dcfb05cb167a5c24953eba58c4ac89b1adf57f28f2f9d09af107ee8f0", s)
	// invalid case
	_, err = ok.Format("id")
	assert.Error(t, err, "invalid length should error")
	_, err = ok.Format(1, 1)
	assert.Error(t, err, "invalid key type should error")
	_, err = ok.Format("id", struct{}{})
	assert.Error(t, err, "invalid value type should error")
}