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: ot_thai.go
    path of file: ./repos/caire/vendor/github.com/go-text/typesetting/harfbuzz
    
    the code of the file until where you have to start completion: package harfbuzz

import (
	"github.com/go-text/typesetting/language"
)

// ported from harfbuzz/src/hb-ot-shape-complex-thai.cc Copyright © 2010,2012  Google, Inc.  Behdad Esfahbod

/* Thai / Lao shaper */

var _ otComplexShaper = complexShaperThai{}

type complexShaperThai struct {
	complexShaperNil
}

/* PUA shaping */

// thai_consonant_type_t
const (
	tcNC = iota
	tcAC
	tcRC
	tcDC
	tcNOTCONSONANT
	numConsonantTypes = tcNOTCONSONANT
)

func getConsonantType(
    
func doThaiPuaShaping(buffer *Buffer, font *Font) {
	aboveState := thaiAboveStartState[tcNOTCONSONANT]
	belowState := thaiBelowStartState[tcNOTCONSONANT]
	base := 0

	info := buffer.Info
	//    unsigned int count = buffer.len;
	for i := range info {
		mt := getMarkType(info[i].codepoint)

		if mt == tmNOTMARK {
			ct := getConsonantType(info[i].codepoint)
			aboveState = thaiAboveStartState[ct]
			belowState = thaiBelowStartState[ct]
			base = i
			continue
		}

		aboveEdge := &thaiAboveStateMachine[aboveState][mt]
		belowEdge := &thaiBelowStateMachine[belowState][mt]
		aboveState = aboveEdge.nextState
		belowState = belowEdge.nextState

		// at least one of the above/below actions is NOP.
		action := belowEdge.action
		if aboveEdge.action != tcNOP {
			action = aboveEdge.action
		}

		buffer.unsafeToBreak(base, i)
		if action == tcRD {
			info[base].codepoint = thaiPuaShape(info[base].codepoint, action, font)
		} else {
			info[i].codepoint = thaiPuaShape(info[i].codepoint, action, font)
		}
	}
}