commands

package
v0.0.0-...-fd7fbd5 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package commands provides functions for CLI commands

Package commands provides functions for CLI commands

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDirHref

func GetDirHref(filehref, dirname string) string

GetDirHref gets href to file and returns link to dir where this file placed.

func GetHelp

func GetHelp()

GetHelp returns help for help CLI command.

func GetIgnoreDirs

func GetIgnoreDirs(toIgnore string) []string

GetIgnoreDirs returns dirs which should be ignored.

func GetMarkdown

func GetMarkdown(url, extension, toIgnore string, cfg MarkdownConfig)

GetMarkdown is CLI command which prints into file generated markdown for this repository.

func IsContains

func IsContains(elements []string, some string) bool

IsContains checks whether an item is in a list or in a list item.

func ParseHrefAttr

func ParseHrefAttr(href, extension string) (bool, bool, string)

ParseHrefAttr get href and file extension and returns is this item mdFile or mdDir and dirname.

Types

type MarkdownConfig

type MarkdownConfig struct {
	Files string // Files prefix in markdown
	Dirs  string // Directories prefix in markdown
}

MarkdownConfig is type which defines markdown output struct.

Jump to

Keyboard shortcuts

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