file

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(args []string) error

Types

type Config

type Config struct {
	Brief  bool `flag:"" desc:"Show brief file type only"`
	MIME   bool `flag:"" desc:"Show MIME type only"`
	XML    bool
	JSON   bool
	Plain  bool
	Pretty bool
}

type FileError

type FileError struct {
	XMLName xml.Name `xml:"error"`
	Code    int      `xml:"code,attr"`
	Msg     string   `xml:"msg,attr"`
	Path    string   `xml:"path,attr"`
}

type FileResult

type FileResult struct {
	XMLName    xml.Name    `xml:"file"`
	Path       string      `xml:"path,attr"`
	Absolute   string      `xml:"absolute,attr"`
	Type       string      `xml:"type,attr"`
	MIME       string      `xml:"mime,attr"`
	Category   string      `xml:"category,attr"`
	Language   string      `xml:"language,attr"`
	Charset    string      `xml:"charset,attr"`
	Executable string      `xml:"executable,attr"`
	Timestamp  int64       `xml:"timestamp,attr"`
	Errors     []FileError `xml:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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