Documentation
¶
Overview ¶
Extensions example shows how to restrict the picker to a set of file extensions, the way many "attach a document" dialogs only allow .pdf, .docx, .doc, and so on.
WithExtensions is opt-in: omit it and every file is shown (the default). Matching is case-insensitive, so "Report.PDF" is included by WithExtensions("pdf"). It also composes with WithFilter — a file is shown if it matches either the glob patterns or the extensions.
Usage:
go run ./examples/extensions go run ./examples/extensions pdf docx doc
Click to show internal directories.
Click to hide internal directories.