stocktrend

command module
v0.0.0-...-917735f Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

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

  1. Clone the repository:

    git clone https://github.com/naiduasn/stocktrend.git
    cd stocktrend
    
  2. Install necessary packages:

    Ensure you have installed the required external packages used in the project.

    go get github.com/joho/godotenv
    
  3. 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

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