file

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Canon

func Canon(v string) string

func Generate

func Generate(w io.Writer, directory string, items ...string) error

func List

func List(directory string) ([]string, error)

func Sort

func Sort(items []string, specialOrder map[string]int) []string

Sort by name first then with special order. Special order should be generated by the order package.

This is based on how gitignore.io sorts the result: https://github.com/toptal/gitignore.io/blob/83dbcff2f7e3e084807ab64f7b545d256df7ca64/Sources/App/RouteHandlers/APIRouteHandlers.swift#L131-L132

Types

type File

type File struct {
	Name string
	Typ  string
}

type IgnoreFile

type IgnoreFile struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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