Documentation
¶
Overview ¶
Package scan holds small, dependency-free file inspection helpers shared by the filesystem adapter, the interactive prompt, and converter backends.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsTextFile ¶
IsTextFile probes the beginning of the file and reports whether it looks like plain text. Directories are never text files.
func LooksLikeText ¶
LooksLikeText reports whether the byte sample reads as plain text.
func SVGLength ¶
SVGLength parses an SVG length attribute value such as "128", "128px". Percent values are rejected because they have no absolute size.
func SVGSize ¶
SVGSize returns the intrinsic size of an SVG document as "WxH", preferring width/height attributes and falling back to the viewBox.
func SVGViewBoxSize ¶
SVGViewBoxSize extracts width and height from a viewBox attribute value.
func SizeString ¶
SizeString renders float dimensions as a "WxH" string with a 1px floor.
Types ¶
This section is empty.