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

import (
	"github.com/go-jet/jet/v2/internal/jet"
)

type onConflict interface {
	ON_CONSTRAINT(name string) conflictTarget
	WHERE(indexPredicate BoolExpression) conflictTarget
	conflictTarget
}

type conflictTarget interface {
	DO_NOTHING() InsertStatement
	DO_UPDATE(action conflictAction) InsertStatement
}

type onConflictClause struct {
	insertStatement  InsertStatement
	constraint       string
	indexExpressions []
    
func (o *onConflictClause) Serialize(statementType jet.StatementType, out *jet.SQLBuilder, options ...jet.SerializeOption) {
	if len(o.indexExpressions) == 0 && o.constraint == "" {
		return
	}

	out.NewLine()
	out.WriteString("ON CONFLICT")
	if len(o.indexExpressions) > 0 {
		out.WriteString("(")
		jet.SerializeColumnExpressions(o.indexExpressions, statementType, out, jet.ShortName)
		out.WriteString(")")
	}

	if o.constraint != "" {
		out.WriteString("ON CONSTRAINT")
		out.WriteString(o.constraint)
	}

	o.whereClause.Serialize(statementType, out, jet.SkipNewLine, jet.ShortName)

	out.IncreaseIdent(7)
	jet.Serialize(o.do, statementType, out)
	out.DecreaseIdent(7)
}