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

import (
	"errors"
	"fmt"

	openfgav1 "github.com/openfga/api/proto/openfga/v1"

	"gith
    
func InvalidWriteInputError(tk tuple.TupleWithoutCondition, operation openfgav1.TupleOperation) error {
	switch operation {
	case openfgav1.TupleOperation_TUPLE_OPERATION_DELETE:
		return fmt.Errorf(
			"cannot delete a tuple which does not exist: user: '%s', relation: '%s', object: '%s': %w",
			tk.GetUser(),
			tk.GetRelation(),
			tk.GetObject(),
			ErrInvalidWriteInput,
		)
	case openfgav1.TupleOperation_TUPLE_OPERATION_WRITE:
		return fmt.Errorf(
			"cannot write a tuple which already exists: user: '%s', relation: '%s', object: '%s': %w",
			tk.GetUser(),
			tk.GetRelation(),
			tk.GetObject(),
			ErrInvalidWriteInput,
		)
	default:
		return nil
	}
}