sort_things

package
v0.55.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFileModTime

func GetFileModTime(fileFPath string) time.Time

func IsFile

func IsFile(filePath string) bool

IsFile 存在且是文件

func SortByModTime

func SortByModTime(fileList []string) []string

SortByModTime 根据文件的 Mod Time 进行排序,递减

Types

type ByModTime

type ByModTime []string

func (ByModTime) Len

func (fis ByModTime) Len() int

func (ByModTime) Less

func (fis ByModTime) Less(i, j int) bool

func (ByModTime) Swap

func (fis ByModTime) Swap(i, j int)

type PathSlice

type PathSlice struct {
	Path string
}

type PathSlices

type PathSlices []PathSlice

func SortStringSliceByLength

func SortStringSliceByLength(m []string) PathSlices

SortStringSliceByLength 排序得到匹配上的路径,最长的那个

func (PathSlices) Len

func (a PathSlices) Len() int

func (PathSlices) Less

func (a PathSlices) Less(i, j int) bool

func (PathSlices) Swap

func (a PathSlices) Swap(i, j int)

Jump to

Keyboard shortcuts

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