Categorygithub.com/vasanthdeveloper/samaya
modulepackage
1.0.0
Repository: https://github.com/vasanthdeveloper/samaya.git
Documentation: pkg.go.dev

# README

samaya

( समय​ ) - A time synchronization program that uses HTTP protocol.

samaya is a command line program for synchronizes your system clock using the HTTPS protocol from World Time API. samaya is very helpful in situations where NTP (Network Time Protocol) packets are blocked or inaccessible.

Usage

samaya
A time synchronization program that uses HTTP protocol.

Usage:
  samaya [flags]

Flags:
  -D, --delay int           Delay the number of seconds before requesting the time
  -d, --dry                 Fetch the time, but don't update it
  -h, --help                help for samaya
  -t, --timezone string     Set time of that timezone (default "auto")
  -v, --verbose             Show extended output
  -V, --version             Print the version number and exit
  -w, --wait for internet   Wait until an active internet connection is established

Building

Dependencies:

PackageRecommended Version
Gov1.12.8
Makev4.2.1
Gitv2.23.0

Build Procedure:

# Create the namespace
mkdir -p "$(go env GOPATH)/src/vasanthdeveloper.com"

# Clone the project
git clone --single-branch --branch mainline https://github.com/vasanthdeveloper/samaya.git "$(go env GOPATH)/src/vasanthdeveloper.com/samaya"

# Enter the freshly cloned project
cd "$(go env GOPATH)/src/vasanthdeveloper.com/samaya"

# Start the compilation
make

# Install the compiled binaries
sudo make install

# Make samaya sync time, every time we boot the computer
sudo systemctl enable --now samaya

Contributions & Issues

Please feel free to raise an issue for suggestions or bugs. You can also tweet me @vasanthdevelope.

License

The samaya project is released under the GNU Public License v2.
Developed & Maintained By Vasanth Developer. Copyright 2019 © Vasanth Developer.


vasanth.tech  ·  YouTube @vasanthdeveloper  ·  Twitter @vasanthdevelope  ·  Discord Vasanth Developer

# Packages

Package constants holds some constant variables that are used across the project.
Package logger creates structured and colored log messages.
No description provided by the author

# Functions

Start is the function that is trigger by the command line parser cobra.

# Variables

Build is whether this is a stable build or not.
BuildOS is the variable in which we store the name of the operating system.
BuildTime is the variable where we store when we compiled this program.
CommitHash is the variable where we store the hash of the Git commit.
GitBranch is where we store the branch name from which this program was compiled.
Hostname is the computer name on with the program was compiled.
Kernel is the kernel name & version on which this program was compiled.
Username is who compiled this program.
Version is the program's version.