megabild / golang-utils

Some handy utils for the go programming language.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Golang-Utils

Some handy utils for the go programming language.

Installation

$ go get github.com/megabild/golang-utils

Usage

package main

import (
	"fmt"
	"github.com/megabild/golang-utils/mbpath"
	"github.com/megabild/golang-utils/mbstring"
	"github.com/megabild/golang-utils/mbmail"
)

func main() {
	// prints "Hello World!"
	fmt.Println(mbstring.Coalesce("  ","Hello World!"))

	// prints "\temp\folder"
	fmt.Println(mbpath.RemoveDriveLetter("C:\\temp\\folder"))
    
	mailer := mbmail.Create("smtp.host.de", "username", "password", "Max Mustermann")
	err := mailer.Send("recipient@mail.de", "subject", "message")
}

License

MIT

About

Some handy utils for the go programming language.


Languages

Language:Go 100.0%