This package to make it easy to work with env

Go Env

This package to make it easy to work with env

Example usage

package main

import (
    "fmt"
    "github.com/frstpw/go-env"
    "os"
)

func main() {
    os.Setenv("ENV_EXAMPLE", "123123")
    defer os.Unsetenv("ENV_EXAMPLE")

    fmt.Println(env.Get("ENV_EXAMPLE").Int(133))
}

Output: 123123

env.Get("ENV_EXAMPLE").Int(133)
env.Get("ENV_EXAMPLE").String("default value")
env.Get("ENV_EXAMPLE").Bool(false)
env.Get("ENV_EXAMPLE").Float32(3.1415927)
env.Get("ENV_EXAMPLE").Float64(3.141592653589793)
Owner
Sergey A.
Software Engineer, working with @php @golang
Sergey A.
Similar Resources

Golang-video-screensaver - A work in progress Microsoft Windows video screensaver implemented in Go

golang-video-screensaver A work in progress Microsoft Windows video screensaver

Sep 5, 2022

Package varflag implements command-line flag parsing into vars.Variables for easy type handling with additional flag types.

varflag Package flag implements command-line flag parsing into vars.Variables for easy type handling with additional flag types. varflag Flags String

Aug 2, 2022

JOB, make your short-term command as a long-term job. 将命令行规划成任务的工具

job make your short-term command as a long-term job Install Shell Install (Linux & MacOS) # binary will be $(go env GOPATH)/bin/job $: curl -sfL https

Nov 12, 2022

Make Highly Customized Boxes for your CLI

Make Highly Customized Boxes for your CLI

Box CLI Maker 📦 Box CLI Maker is a Highly Customized Terminal Box Creator. Features Make Terminal Box in 8️⃣ inbuilt different styles 16 Inbuilt Colo

Jan 1, 2023

Make any Go function into a API (FaaS)

faas Make any (Go) function into an API with one HTTP request. This is a FaaS: functions as a service. But, in actuality, its more of a FaaSSS: functi

Dec 30, 2022

An attempt to make a cli for dev.to in Go

An attempt to make a cli for dev.to in Go

Devto a cli for dev.to This is a work in progress so don't a expect a full support for Dev API(beta). Table of contents Devto a cli for dev.to Table o

Mar 13, 2022

Make Link with Markdown Format

Make Link with Markdown Format

ml -- Make Link with Markdown Format This package is required Go 1.16 or later. Build and Install $ go install github.com/spiegel-im-spiegel/gpgpdump@

Mar 20, 2022

This repository contains utility functions that do not make sense in other packages.

Installation go get github.com/IQ-tech/go-utils Executing code before process exits AtInterruption receives a function that will be called once befor

Dec 9, 2021

Bofin - A command line tool that can be used by to make Weblink development more productive

Bofin A command line tool that can be used by to make Weblink development more p

Jan 13, 2022
Related tags
An easy to use menu structure for cli applications that prompts users to make choices.
An easy to use menu structure for cli applications that prompts users to make choices.

WMenu Package wmenu creates menus for cli programs. It uses wlog for its interface with the command line. It uses os.Stdin, os.Stdout, and os.Stderr w

Dec 26, 2022
A convenience provider for reading `.env` files in Terraform.

Terraform Provider dotenv This is a convenience provider for Terraform that provides a data source for reading .env files. Using the provider Below is

Dec 23, 2022
Envopts - Provides a code generator for turning env structs into functional options

envopts Provides a code generator to turn structs annotated for the popular env

Jan 10, 2022
Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies.
Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies.

asciigraph Go package to make lightweight ASCII line graphs ╭┈╯. Installation go get github.com/guptarohit/asciigraph Usage Basic graph package main

Jan 8, 2023
a work time management CLI tool for any platform
a work time management CLI tool for any platform

english |日本語 jobgosh | job management tool made with golang for shell a multi-platform work time management CLI tool to track and improve your day to

May 16, 2022
Another Go shellcode loader designed to work with Cobalt Strike raw binary payload.
Another Go shellcode loader designed to work with Cobalt Strike raw binary payload.

Bankai Another Go shellcode loader designed to work with Cobalt Strike raw binary payload. I created this project to mainly educate myself learning Go

Dec 29, 2022
Easily manage your work via command line

Wo Easily manage your work via command line Introduction Wo, is cli that provides it easy to manage your workspace. Wo provides to manipulating workfl

Dec 11, 2021
Plugin which makes tmux work and feel like i3wm

Tmux Tilish This is a plugin that makes tmux behave more like a typical dynamic window manager. It is heavily inspired by i3wm, and most keybindings a

Jan 7, 2023
A CLI tool for working with CloudWatch logs. It performs functions that I need at work.

CloudWatch Logs Utility A simple utility for working with CloudWatch Logs. AWS should probably build this themselves, but since they won't, I am here

Dec 31, 2021
There is a certain amount of work to be done before you can implement the features of your Go powered CLI app

go-project-template-cli There is a certain amount of work to be done before you can implement the features of your Go powered CLI app. A few of those

Jan 23, 2022