command
module
Version:
v0.0.0-...-917735f
Opens a new window with list of versions in this module.
Published: Feb 9, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
stocktrend
This Go application fetches data from an API based on configuration from an .env
file.
Prerequisites
- Go installed (version 1.21.X)
.env
file in the project root directory with the following keys:
URL
: API endpoint URL
TIMEOUT
: Timeout in seconds (numeric value)
Setup
-
Clone the repository:
git clone https://github.com/naiduasn/stocktrend.git
cd stocktrend
-
Install necessary packages:
Ensure you have installed the required external packages used in the project.
go get github.com/joho/godotenv
-
Create and set environment variables in .env
file:
Create a file named .env
in the root directory of the project and add the required environment variables:
URL=<API to fetch live stocks data>
TIMEOUT=60
Usage
Build and Run
Use the following commands to build and run the application:
go build -o stocktrend main.go
./stocktrend
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.