content

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2024 License: MIT Imports: 5 Imported by: 4

Documentation

Index

Constants

View Source
const (
	FileTypeYAML    = "yaml"
	FileTypeJSON    = "json"
	FileTypeCSV     = "csv"
	FileTypeUnknown = "unknown"
)

Variables

This section is empty.

Functions

func IsCSV

func IsCSV(content string) bool

IsCSV checks if the passed content of CSV.

func IsJSON

func IsJSON(content string) bool

IsJSON checks if the passed content of JSON.

func IsYAML

func IsYAML(content string) bool

IsYAML checks if the passed content of YAML.

Types

type Object

type Object string

Object implements method that check for file content type.

func Marshal added in v0.0.4

func Marshal(data interface{}) (Object, error)

func (Object) CheckFileType

func (obj Object) CheckFileType(log *logrus.Logger) string

CheckFileType checks the file type of the content passed, it validates for YAML/JSON.

func (Object) String

func (obj Object) String() string

String should return the string equivalent of Object.

Jump to

Keyboard shortcuts

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