snippet

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

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

Go to latest
Published: Jun 24, 2023 License: MIT Imports: 4 Imported by: 2

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