Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/boysimon10/go-simple-calc
A simple calculator built with Go to practice my Go programming skills.
https://github.com/boysimon10/go-simple-calc
go golang
Last synced: 9 days ago
JSON representation
A simple calculator built with Go to practice my Go programming skills.
- Host: GitHub
- URL: https://github.com/boysimon10/go-simple-calc
- Owner: boysimon10
- Created: 2024-11-21T11:34:48.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-21T13:19:30.000Z (2 months ago)
- Last Synced: 2024-11-21T14:24:09.562Z (2 months ago)
- Topics: go, golang
- Language: Go
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Go Simple Calculator
## Description
A simple command-line calculator in Go, supporting basic mathematical operations.## Features
- Addition (+)
- Subtraction (-)
- Multiplication (*)
- Division (/)## Prerequisites
- Go 1.23.2 or higher## Installation
1. Clone the repository
```bash
git clone https://github.com/boysimon10/go-simple-calc.git
cd go-simple-calc
```2. Initialize Go module
```bash
go mod init github.com/boysimon10/go-simple-calc
go mod tidy
```## Usage
```bash
go run cmd/main.go
```Example:
```
[number 1] [operator] [number 2]
5 + 3
```## Project Structure
- `cmd/main.go`: Main entry point
- `pkg/calculator/`: Mathematical operations
- `pkg/handler/`: Input and calculation handling
- `pkg/utils/`: Utility functions