icons

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package icons provides a set of unicode icons based on type and extension.

Index

Constants

This section is empty.

Variables

View Source
var IconDef = map[string]*IconInfo{
	"dir":        {/* contains filtered or unexported fields */},
	"diropen":    {/* contains filtered or unexported fields */},
	"hiddendir":  {/* contains filtered or unexported fields */},
	"exe":        {/* contains filtered or unexported fields */},
	"file":       {/* contains filtered or unexported fields */},
	"hiddenfile": {/* contains filtered or unexported fields */},
}

IconDef is a map of default icons if none can be found.

View Source
var IconDir = map[string]*IconInfo{
	"config":         IconSet["dir-config"],
	".config":        IconSet["dir-config"],
	"configs":        IconSet["dir-config"],
	"configuration":  IconSet["dir-config"],
	"configurations": IconSet["dir-config"],
	"settings":       IconSet["dir-config"],
	".settings":      IconSet["dir-config"],
	"META-INF":       IconSet["dir-config"],
	"controller":     IconSet["dir-controller"],
	"controllers":    IconSet["dir-controller"],
	"service":        IconSet["dir-controller"],
	"services":       IconSet["dir-controller"],
	"provider":       IconSet["dir-controller"],
	"providers":      IconSet["dir-controller"],
	".git":           IconSet["dir-git"],
	"githooks":       IconSet["dir-git"],
	".githooks":      IconSet["dir-git"],
	"submodules":     IconSet["dir-git"],
	".submodules":    IconSet["dir-git"],
	".github":        IconSet["dir-github"],
	"node_modules":   IconSet["dir-npm"],
	"include":        IconSet["dir-include"],
	"includes":       IconSet["dir-include"],
	"_includes":      IconSet["dir-include"],
	"import":         IconSet["dir-import"],
	"imports":        IconSet["dir-import"],
	"imported":       IconSet["dir-import"],
	"uploads":        IconSet["dir-upload"],
	"upload":         IconSet["dir-upload"],
	"downloads":      IconSet["dir-download"],
	"download":       IconSet["dir-download"],
	"auth":           IconSet["dir-secure"],
	"authentication": IconSet["dir-secure"],
	"secure":         IconSet["dir-secure"],
	"security":       IconSet["dir-secure"],
	"cert":           IconSet["dir-secure"],
	"certs":          IconSet["dir-secure"],
	"certificate":    IconSet["dir-secure"],
	"certificates":   IconSet["dir-secure"],
	"ssl":            IconSet["dir-secure"],
	"images":         IconSet["dir-images"],
	"image":          IconSet["dir-images"],
	"pics":           IconSet["dir-images"],
	"pic":            IconSet["dir-images"],
	"pictures":       IconSet["dir-images"],
	"picture":        IconSet["dir-images"],
	"img":            IconSet["dir-images"],
	"icons":          IconSet["dir-images"],
	"icon":           IconSet["dir-images"],
	"ico":            IconSet["dir-images"],
	"screenshot":     IconSet["dir-images"],
	"screenshots":    IconSet["dir-images"],
	".env":           IconSet["dir-environment"],
	".environment":   IconSet["dir-environment"],
	"env":            IconSet["dir-environment"],
	"environment":    IconSet["dir-environment"],
	"environments":   IconSet["dir-environment"],
}

IconDir is used to get the icon based on the type of directory.

View Source
var IconExt = map[string]*IconInfo{}/* 442 elements not displayed */

IconExt is used to represent an icon with a specific extension.

View Source
var IconFileName = map[string]*IconInfo{}/* 338 elements not displayed */

IconFileName is used to get the icon based on its filename.

View Source
var IconSet = map[string]*IconInfo{}/* 234 elements not displayed */

IconSet is a map to represent all the icons.

View Source
var IconSubExt = map[string]*IconInfo{
	"routing.ts":           IconSet["routing"],
	"routing.tsx":          IconSet["routing"],
	"routing.js":           IconSet["routing"],
	"routing.jsx":          IconSet["routing"],
	"routes.ts":            IconSet["routing"],
	"routes.tsx":           IconSet["routing"],
	"routes.js":            IconSet["routing"],
	"routes.jsx":           IconSet["routing"],
	"sln.dotsettings":      IconSet["settings"],
	"d.ts":                 IconSet["typescript-def"],
	"vcxitems.filters":     IconSet["visualstudio"],
	"vcxproj.filters":      IconSet["visualstudio"],
	"js.map":               IconSet["javascript-map"],
	"mjs.map":              IconSet["javascript-map"],
	"css.map":              IconSet["css-map"],
	"spec.ts":              IconSet["test-ts"],
	"e2e-spec.ts":          IconSet["test-ts"],
	"test.ts":              IconSet["test-ts"],
	"ts.snap":              IconSet["test-ts"],
	"spec.tsx":             IconSet["test-jsx"],
	"test.tsx":             IconSet["test-jsx"],
	"tsx.snap":             IconSet["test-jsx"],
	"spec.jsx":             IconSet["test-jsx"],
	"test.jsx":             IconSet["test-jsx"],
	"jsx.snap":             IconSet["test-jsx"],
	"spec.js":              IconSet["test-js"],
	"e2e-spec.js":          IconSet["test-js"],
	"test.js":              IconSet["test-js"],
	"js.snap":              IconSet["test-js"],
	"tf.json":              IconSet["terraform"],
	"blade.php":            IconSet["laravel"],
	"inky.php":             IconSet["laravel"],
	"gitlab-ci.yml":        IconSet["gitlab"],
	"stories.js":           IconSet["storybook"],
	"stories.jsx":          IconSet["storybook"],
	"story.js":             IconSet["storybook"],
	"story.jsx":            IconSet["storybook"],
	"stories.ts":           IconSet["storybook"],
	"stories.tsx":          IconSet["storybook"],
	"story.ts":             IconSet["storybook"],
	"story.tsx":            IconSet["storybook"],
	"azure-pipelines.yml":  IconSet["azure-pipelines"],
	"azure-pipelines.yaml": IconSet["azure-pipelines"],
}

IconSubExt is a map to get the icon based on its subdirectory extension.

Functions

func GetIcon

func GetIcon(name, ext, indicator string) (icon, color string)

GetIcon returns the icon based on its name, extension and indicator.

func GetIndicator

func GetIndicator(modebit os.FileMode) (i string)

GetIndicator returns the indicator for the given file.

Types

type IconInfo

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

IconInfo is a struct that holds information about an icon.

func (*IconInfo) GetColor

func (i *IconInfo) GetColor(f uint8) string

GetColor returns the color for the icon.

func (*IconInfo) GetGlyph

func (i *IconInfo) GetGlyph() string

GetGlyph returns the glyph for the icon.

func (*IconInfo) MakeExe

func (i *IconInfo) MakeExe()

MakeExe is a function that returns a new IconInfo struct with the executable flag set to true.

Jump to

Keyboard shortcuts

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