textprofile

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatFromPath

func FormatFromPath(path string) string

Types

type ContentProfile

type ContentProfile struct {
	LikelyText      bool
	UTF8Valid       bool
	HasNonASCII     bool
	HasCyrillic     bool
	HasCJK          bool
	HasReplacement  bool
	DominantScripts []Script
	SampleBytes     int
}

func ProfilePath

func ProfilePath(path string) (ContentProfile, error)

func ProfilePathWithFormat

func ProfilePathWithFormat(path, format string) (ContentProfile, error)

func ProfileReader

func ProfileReader(format string, r io.Reader) (ContentProfile, error)

func ProfileReaderLimit

func ProfileReaderLimit(format string, r io.Reader, limit int64) (ContentProfile, error)

type Script

type Script string
const (
	ScriptASCII    Script = "ascii"
	ScriptCyrillic Script = "cyrillic"
	ScriptCJK      Script = "cjk"
	ScriptOther    Script = "other"
)

Jump to

Keyboard shortcuts

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