utils

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2019 License: GPL-3.0 Imports: 8 Imported by: 9

Documentation

Overview

Package utils contains utility functions that are used everywhere in the app.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllFilesIn

func AllFilesIn(dir string) []string

AllFilesIn recursively builds a list of the files in a given directory

func CaptureOutput

func CaptureOutput(f func()) string

CaptureOutput executes a function and capture all the text outputed to logs. Used in unit tests.

func CoreExt

func CoreExt() string

CoreExt returns the libretro core extension for the current OS

func Filename

func Filename(path string) string

Filename returns the name of a file, without the path and extension.

func LinesInFile

func LinesInFile(r io.Reader) (int, error)

LinesInFile counts the number of lines in a file

func StringInSlice

func StringInSlice(a string, list []string) bool

StringInSlice check wether a string is contain in a string slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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