type Builder … var replacer … func (b *Builder) WriteText(s string) { … } func (b *Builder) PrependText(s string) { … } func (b *Builder) Write(data []byte) (int, error) { … } // WritePlaceholder writes a tab stop and placeholder value to the Builder. // The callback style allows for creating nested placeholders. To write an // empty tab stop, provide a nil callback. func (b *Builder) WritePlaceholder(fn func(*Builder)) { … } // WriteFinalTabstop marks where cursor ends up after the user has // cycled through all the normal tab stops. It defaults to the // character after the snippet. func (b *Builder) WriteFinalTabstop() { … } var choiceReplacer … // WriteChoice writes a tab stop and list of text choices to the Builder. // The user's editor will prompt the user to choose one of the choices. func (b *Builder) WriteChoice(choices []string) { … } // String returns the built snippet string. func (b *Builder) String() string { … } // Clone returns a copy of b. func (b *Builder) Clone() *Builder { … } // nextTabStop returns the next tab stop index for a new placeholder. func (b *Builder) nextTabStop() int { … }