string-interpolation

command module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: MIT Imports: 1 Imported by: 0

README

String interpolation in Go finally made easy...

Simple string interpolation for golang. Interpolates anything in an easy way.

No need to pass the format parameters %d, %s, %t... anymore!

Installation

go get github.com/evandrojr/string-interpolation

Usage

package main

import (
	"github.com/evandrojr/string-interpolation/esi"
)

func main() {
	esi.Print("Print ", 10, " ", 7, " interpolates anything ", true, " ", 3.4e10)
	esi.Print(" no line break")
	esi.Println()
	esi.Println("Println ", 10, " ", 7, " interpolates anything ", true, " ", 3.4e10)
	f := esi.Sprint("Sprint ", 10, " ", 7, " interpolates anything ", true, " ", 3.4e10)
	esi.Print(f)
}

Output
Print 10 7 interpolates anything true 3.4e+10 no line break
Println 10 7 interpolates anything true 3.4e+10
Sprint 10 7 interpolates anything true 3.4e+10% 

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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