internal

package
v0.0.0-...-43c8ab9 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

README

Package cloudeng.io/go/cmd/goannotate/annotators/internal

CircleCI Go Report Card

import cloudeng.io/go/cmd/goannotate/annotators/internal

Constants

DocTagName
DocTagName = "annotator"

DocTagName is the struct tag used to document annotator configuration fields.

Functions

Func DelegatedYAML
func DelegatedYAML(v interface{}, unmarshal func(interface{}) error) error

DelegatedYAML will unmarshal the yaml configuration into a yaml.MapSlice and named fields. Given:

struct {
  YAML.MapSlice
  Type string `yaml:"type"`
}

it will unmarshal the entire config into the MapSlice and if any of the fields in MapSlice have a key 'type', the value for that key will assigned to the Type field.

Func Indent
func Indent(text string, indent int) string
Func MustDescribe
func MustDescribe(t interface{}, detail string) string
Func RemarshalYAML
func RemarshalYAML(v yaml.MapSlice, unmarshal func(buf []byte) error) error

RemarshalYAML will marshal the supplied yaml.MapSlice to a buf and then invoke the supplied unmarshal function.

Documentation

Index

Constants

View Source
const DocTagName = "annotator"

DocTagName is the struct tag used to document annotator configuration fields.

Variables

This section is empty.

Functions

func DelegatedYAML

func DelegatedYAML(v interface{}, unmarshal func(interface{}) error) error

DelegatedYAML will unmarshal the yaml configuration into a yaml.MapSlice and named fields. Given:

struct {
  YAML.MapSlice
  Type string `yaml:"type"`
}

it will unmarshal the entire config into the MapSlice and if any of the fields in MapSlice have a key 'type', the value for that key will assigned to the Type field.

func Indent

func Indent(text string, indent int) string

func MustDescribe

func MustDescribe(t interface{}, detail string) string

func RemarshalYAML

func RemarshalYAML(v yaml.MapSlice, unmarshal func(buf []byte) error) error

RemarshalYAML will marshal the supplied yaml.MapSlice to a buf and then invoke the supplied unmarshal function.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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