Documentation ¶
Index ¶
- Constants
- Variables
- func Copy(srcFile, dstFile string) error
- func CopyDirectory(scrDir, dest string) error
- func CopySymLink(source, dest string) error
- func CreateIfNotExists(dir string, perm os.FileMode) error
- func DirIsEmpty(d string) (empty bool, err error)
- func Exists(filePath string) bool
- func FileExist(p string) bool
- func FindActivities(misatoPath string) []string
- func FindExtension(notePath, extension string) (files []string)
- func FindExtensionMaxdepth(notePath, extension string, maxdepth int) (files []string)
- func FindJSON(notePath string) (jsonFiles []string)
- func FindMd(notePath string) (mdFiles []string)
- func FindMilestones(misatoPath string) []string
- func FindMisatoLogs(misatoPath string) []string
- func FindTagsInFile(filename string) (tags []string, err error)
- func GetAbsPath(baseDir, fileToOpen string) (abs string, err error)
- func GetLeLExePath() string
- func HasMDFilesChanged(since time.Time, notePath string) (changes []string, hasChanged bool)
- func OpenInEditor(executablePath, filePath string) error
- func ReadLinesFromFiles(filename string) ([]string, error)
- func SearchInFile(filename string, searchword string) (bool, error)
- func SearchWithPreviewInFile(filename, searchword string) (matches []string, err error)
- func SliceAreEqual(slice1 []string, slice2 []string) bool
- func SplitAndTrim(line, pattern string) (parts []string)
- func TrimPart(part, prefix string) (rest string)
- func TrimParts(parts []string, prefix string) []string
- func WriteTo(filename string, bts []byte) error
Constants ¶
const ( // TODO_PATTERN define the todo pattern for actions, which should be // should be in form of // @todo: tags-related // [ ] Something // later some form of todo.txt might come in handy. // TODO_PATTERN = "@todo " // Tags define tags for a specific document TAGS_PATTERN = "@tags " // name defines aliases for later references // "this" can't be chosen, must be unique NAME_PATTERN = "@name " // the first name will be used, if @display is not defined LABEL_PATTERN = "@label " // entity defines the different types (also defines custom icons) ENTITY_PATTERN = "@entity " // icon defines the src of custom svg images ICON_PATTERN = "@icon " // References contain information for specific objects // which can be link by providing the name or an alias of the object // and the relation it might have // Example: // @ref example // (diese resource is refereced for example (only works with entity: info)) // @ref (this)->[:dns]->(CW) // (diese resource hat einen dns channel zum object CW) // @ref (fireye)->[installed]->(this) // other resources can be linked to this // @ref (CW)->[this]->(fireeye) // references can also define the relation itself REFERENCE_PATTERN = "@ref " VAL_DELIMITER = "," REFERENCE_REG_PATTERN = `\(([^)]*)\)->\[([^\]]*)\]->\(([^)]*)\)` THIS_REFERENCE = "this" // Supported Icons COMPUTER_SHAPE = "" CLIENT = "" SERVER = "" DC = "" ACCOUNT = "" PROXY = "" DATABASE = "" FILE = "" CLOUD = "" CW = "" )
const (
// FKKK represents something went bad ¯\_(ツ)_/¯
FKKK = "¯\\_(ツ)_/¯"
)
Variables ¶
var (
ERR_READPATH = errors.New("Path could not be read")
)
Functions ¶
func CopyDirectory ¶
func CopySymLink ¶
func DirIsEmpty ¶
DirIsEmpty checks if the directory contains any files
func FileExist ¶
FileExist checks if a file Exist and returns false if a file does not exist or an error occur
func FindActivities ¶
func FindExtension ¶
FindExtension returns all files with a specified extension
func FindExtensionMaxdepth ¶
FindExtensionMaxdepth todo
func FindMilestones ¶
func FindMisatoLogs ¶
func FindTagsInFile ¶
FindTagsInFile returns all tags, which were found in the file
func GetAbsPath ¶
GetCleanFilePath returns the abs, clean path and verifies if the file Exists
func GetLeLExePath ¶
func GetLeLExePath() string
func HasMDFilesChanged ¶
HasMDFilesChanged validates if any mdFile changed and returns the modified files
func OpenInEditor ¶
OpenInEditor execute the editorPath with the filepath as an argument
func ReadLinesFromFiles ¶
ReadLinesFromFiles
func SearchInFile ¶
SearchInFile searches a pattern and returns wether or not it was found
func SearchWithPreviewInFile ¶
SearchWithPreviewInFile returns TODO , n int with previous and after line
func SliceAreEqual ¶
func SplitAndTrim ¶
Types ¶
This section is empty.