snippet

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: GPL-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Snippet

type Snippet struct {
	ID           uuid.UUID `json:"id"`
	Abbreviation string    `json:"abbreviation"`
	Body         string    `json:"body"`
	LastUsed     time.Time `json:"lastUsed"`
}

func (*Snippet) FormattedString

func (s *Snippet) FormattedString(id bool, abbreviation bool, body bool, lastUsed bool, delimiter string) string

FormattedString returns a string representation of a snippet with specified fields and delimiter.

func (*Snippet) MarshalJSON

func (s *Snippet) MarshalJSON() ([]byte, error)

func (*Snippet) String

func (s *Snippet) String() string

String returns the default string representation of a snippet.

func (*Snippet) UnmarshalJSON

func (s *Snippet) UnmarshalJSON(contents []byte) error

type V101

type V101 struct {
	Abbreviation string
	Body         string
}

func (*V101) MarshalJSON

func (s *V101) MarshalJSON() ([]byte, error)

func (*V101) UnmarshalJSON

func (s *V101) UnmarshalJSON(contents []byte) error

Jump to

Keyboard shortcuts

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