# README
Friendly Go
A small library with functions I use all the time in my projects.
Also useful if you are starting to learn Go and are annoyed by implementing basic things in your project all the time.
Install and Use
In your project directory, type
go get github.com/alexcoder04/friendly
And then, in your code
package ...
import (
...
"github.com/alexcoder04/friendly"
)
...
if friendly.IsDir(path) {
friendly.CompressFolder(path, destination)
}
...
Functions
github.com/alexcoder04/friendly
// files
func WriteNewFile(file string, content string) error { }
func WriteLines(file string, lines []string) error { }
func ReadLines(file string) ([]string, error) { }
func CopyFile(source string, destin string) error { }
func CopyFolder(source string, destination string) error { }
func GetConfigDir(program string) (string, error) { } // creates the directory if it doesn't exist
func GetLogDir(program string) (string, error) { } // creates the directory if it doesn't exist
// os
func Getpwd() string { }
func Run(command string, arguments []string, workingDir string) error { }
func GetOutput(command string, arguments []string, workingDir string) (string, error) { }
func Exists(path string) bool { }
func IsFile(path string) bool { }
func IsDir(path string) bool { }
func ListFilesRecursively(folder string) ([]string, error) { }
// zip
func UncompressFolder(source string, destination string) error { }
func CompressFolder(folder string, destination string) error { }
// misc
func ArrayContains(arr []interface{}, value interface{}) bool { }
func SemVersionGreater(v1 string, v2 string) bool { }
func DownloadFile(downloadUrl string, path string) error { }
github.com/alexcoder04/friendly/linux
// desktop
func GetDisplayServer() string { }
func GuiRunning() bool { }
Contributing
If you use this library and are missing some feature - don't hesiatate to open a pull request or an issue, I'm always looking forward to improve this project!
# Packages
No description provided by the author
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author