Earthquake Data Fetcher in Go
This Go program fetches and displas Earthquake data.
Autor: Marcelo Pinheiro
Data Source
Table of Contents
Getting Started
Prerequisites
- Go installed on your machine
- Internet connection to fetch earthquake data from the USGS API
Installation
-
Clone the repository:
git clone https://github.com/mpinheir/Terremoto-em-go.git
-
Change into the project directory:
cd Terremoto-em-go
-
Build binary:
go build
-
Run the program:
go run main.go <arg>
ex:
go run main.go 6
will display earthquake greater than 6 degrees -
Run the binary after building:
eqk <arg>
ex:
eqk 5
will display earthquake greater than 5 degrees
Usage
The program fetches data from the USGS Earthquake API and displays information about them, including location, magnitude, and time.
-------------------------------------------------------------------
Earthquakes above 6 Richter scale in the last 30 days:
-------------------------------------------------------------------
Epicenter = [Location]
Magnitude: [Magnitude]
Time: [Timestamp]
-------------------------------------------------------------------
Contributing
Contributions to this project are welcome! Feel free to open issues and pull requests to suggest improvements, report bugs, or add new features.
License
This project is licensed under the MIT License.