helper_method_content.go
func (e *helperMethodContent) WriteTo(w io.Writer) (int64, error) {
	var bf bytes.Buffer

	inner := e.src.inner
	if inner == nil {
		return 0, fmt.Errorf("inner is not specified [file: %s][line: %d]", e.ln.fileName(), e.ln.no)
	}

	// Write a define action.
	bf.WriteString(fmt.Sprintf(actionDefine, e.opts.DelimLeft, inner.path+doubleColon+e.name, e.opts.DelimRight))

	// Write the children's HTML.
	if i, err := e.writeChildren(&bf); err != nil {
		return i, err
	}

	// Write an end action.
	bf.WriteString(fmt.Sprintf(actionEnd, e.opts.DelimLeft, e.opts.DelimRight))

	// Write the buffer.
	i, err := w.Write(bf.Bytes())

	return int64(i), err
}
func (e *helperMethodContent) WriteTo(w io.Writer) (int64, error) {
	var bf bytes.Buffer

	inner := e.src.inner
	if inner == nil {
		return 0, fmt.Errorf("inner is not specified [file: %s][line: %d]", e.ln.fileName(), e.ln.no)
	}

	// Write a define action.
	bf.WriteString(fmt.Sprintf(actionDefine, e.opts.DelimLeft, inner.path+doubleColon+e.name, e.opts.DelimRight))

	// Write the children's HTML.
	if i, err := e.writeChildren(&bf); err != nil {
		return i, err
	}

	// Write an end action.
	bf.WriteString(fmt.Sprintf(actionEnd, e.opts.DelimLeft, e.opts.DelimRight))

	// Write the buffer.
	i, err := w.Write(bf.Bytes())

	return int64(i), err
}
func ( e * helperMethodContent ) WriteTo ( w io . Writer ) ( int64 , error ) { var bf bytes . Buffer inner := e . src . inner if inner == nil { return 0 , fmt . Errorf ( " " , e . ln . fileName ( ) , e . ln . no ) } // Write a define action. bf . WriteString ( fmt . Sprintf ( actionDefine , e . opts . DelimLeft , inner . path + doubleColon + e . name , e . opts . DelimRight ) ) // Write the children's HTML. if i , err := e . writeChildren ( & bf ) ; err != nil { return i , err } // Write an end action. bf . WriteString ( fmt . Sprintf ( actionEnd , e . opts . DelimLeft , e . opts . DelimRight ) ) // Write the buffer. i , err := w . Write ( bf . Bytes ( ) ) return int64 ( i ) , err }
// WriteTo writes data to w.
WriteTo writes data to w .