procstruct

package module
v0.0.0-...-6091203 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func File

func File(pkg string) edsl.Filer

func Of

func Of(val interface{}) edsl.Structer

func RegisterTagStyle

func RegisterTagStyle(name string, style edsl.TagStyle)

func SetDefaultTagStyle

func SetDefaultTagStyle(style edsl.TagStyle)

func Struct

func Struct(name string) edsl.Structer
Example
package main

import (
	"fmt"
	"reflect"

	"github.com/anqur/procstruct"
)

func main() {
	s := procstruct.
		Struct("Foo").
		Header("is a foo.").
		Field("Data", reflect.TypeOf(0), "is the data.")
	fmt.Println(s)
}
Output:

// Foo is a foo.
type Foo struct {
	// Data is the data.
	Data int
}

func Tag

func Tag() edsl.Tagger

Types

This section is empty.

Directories

Path Synopsis
examples module

Jump to

Keyboard shortcuts

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