Categorygithub.com/claudiunicolaa/envsync
repositorypackage
0.0.0-20211006205706-996e87c16d08
Repository: https://github.com/claudiunicolaa/envsync.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

envsync

Coverage Status

envsync-image

GoDoc Build Status Go Report Card

A simple command for checking if the environment and the environment example files are synced. Under the hood, the command checks if the files have the same keys. It can be used as a library or as a bin command.

Operating system, programming language and framework agnostic

The command runs on all three main platforms (Linux, Mac, Windows), it is programming languages and frameworks agnostic.

Built on top of gotdotenv.

Installation

Library

go get github.com/claudiunicolaa/envsync

Bin Command

go get github.com/claudiunicolaa/envsync/cmd/envsync

Usage

Library

package main

import (
	"fmt"
	"github.com/claudiunicolaa/envsync"
)

func main() {
	_, err := envsync.EnvSync(".env", ".env.example")

	if err != nil {
		fmt.Println(err)
		return
	}
	// ...
}

Bin command

Install as above and you can run it like as a bin command from your terminal.

envsync [-h] path/to/environment/example/file [path/to/environment/file]

// The above Go code can be translated into 
envsync .env.example .env

Something wrong?

If you encounter some problems, please open an issue.