name

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Presenter

type Presenter struct{}

Presenter is a presenter that formats v into the list of names.

func NewPresenter

func NewPresenter() *Presenter

func (*Presenter) Format

func (p *Presenter) Format(v interface{}) (string, error)

Format formats v into the list of names. v should be a struct type. Format tries to find "name" tag from the struct fields and format the first appeared field. The struct type is only allowed to have struct, slice or primitive type fields.

Jump to

Keyboard shortcuts

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