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: booktype.xo.go
    path of file: ./repos/xo/_examples/booktest/postgres
    
    the code of the file until where you have to start completion: package postgres

// Code generated by xo. DO NOT EDIT.

import (
	"database/sql/driver"
	"fmt"
)

// BookType is the 'book_type' enum type from schema 'public'.
type BookType 
    
func (bt *BookType) UnmarshalText(buf []byte) error {
	switch str := string(buf); str {
	case "FICTION":
		*bt = BookTypeFiction
	case "NONFICTION":
		*bt = BookTypeNonfiction
	default:
		return ErrInvalidBookType(str)
	}
	return nil
}