Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bayusm0506/hcf-or-gcd-using-go-mux-framework

This Service just to run search Highest Common Factor using go Mux framework
https://github.com/bayusm0506/hcf-or-gcd-using-go-mux-framework

golang postman testing

Last synced: 4 days ago
JSON representation

This Service just to run search Highest Common Factor using go Mux framework

Awesome Lists containing this project

README

        

# HCF (Highest Common Factor)

This Service just to run search Highest Common Factor

## Clone Project

```bash
https://github.com/bayusm0506/hcf-or-gcd.git
cd /hcf-or-gcd
```

## Structure Folder

```
├── app
│ ├── app.go
│ ├── controllers
│ │ ├── hcf.go
│ │ └── response.go
│ └── models
│ └── hcf.go
├── config
│ └── config.go
├── go.mod
├── go.sum
├── hcf-or-gcd
├── main.go
├── main_test.go
├── README.md
```

## Installation

```bash
# Install mux router
go get -u github.com/gorilla/mux

# Install godotenv
go get -u github.com/joho/godotenv

# Install testify
go get github.com/stretchr/testify/assert
```

## Usage

```go
# create file .env in root folder and add variable
APPS_PORT=2021

# running project
go run main.go

# or if you wanna run project with .exe file
go build
./hcf-or-gcd

# Unit Testing
go test -v
```

## API

#### HCF
```sh
POST : /api/hcf
```
```json
JSON :
{
"number1": 20,
"number2": 25
}
```
```
#### APP INFO

#### Author originally
Bayu Setra Maulana [bayusm.com]

Postman Collection : https://www.getpostman.com/collections/e6ac7bc82c04bdd3688d
```