template

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package template provides types the implement the xml.Marshaler interfaces for HC Templates.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommaDelimited

type CommaDelimited []string

CommaDelimited is a slice of string that marshals into an XML comma-separated string.

func (CommaDelimited) MarshalXML

func (s CommaDelimited) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaler interface for s. The slice is joined into a single comma-separated string.

type SpaceDelimited

type SpaceDelimited []string

SpaceDelimited is a slice of string that marshals into an XML space-separated string.

func (SpaceDelimited) MarshalXML

func (s SpaceDelimited) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML implements the xml.Marshaler interface for s. The slice is joined into a single space-separated string.

type Values

type Values map[string]string

Values is a map of strings that marshals into an XML key/value pair.

func (Values) MarshalXML

func (v Values) MarshalXML(e *xml.Encoder, _ xml.StartElement) error

MarshalXML implements the xml.Marshaler interface for v. Each key/value pair renders an XML element. There is no outer VALUE element.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL