fibonacci

command module
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: MIT Imports: 1 Imported by: 0

README

Fibonacci

GitMoji PkgGoDev Lines Of Code CodeQL Build Go Report Card

High Performance Fibonacci Abstraction Layer and an API.

PKG

Install the package by:

go get github.com/UltiRequiem/fibonacci/pkg

This packages exposes two functions, Fibonacci and FibonacciSequence.

Usage Example:

package main

import (
	"fmt"

	fina "github.com/UltiRequiem/fibonacci/pkg"
)

func main() {
	fiboNum, _ := fina.Fibonacci(9)
	fmt.Println(fiboNum) // 34

	fiboSequence, _ := fina.FibonacciSequence(9)
	fmt.Println(fiboSequence) // [0 1 1 2 3 5 8 13 21]
}

For more examples, see internal directory.

Check for more detailed info on pkg.go.dev.

API

API Demo: https://z91bf2703-za30e6095-gtw.qovery.io

Endpoints
  • Root Path

Try curl http://localhost:3000/890

  • Sequence Path

Try curl http://localhost:3000/sequence/890

Run The API
  • Install as a CLI Program...
go install github.com/UltiRequiem/fibonacci@latest

If you have correctly configured your GOPATH, then:

fibonacci -p 8080
  • Using Binary from Releases

You can get the build of the project in releases.

  • From Source

git clone this project or download it in zip format.

git clone https://github.com/UltiRequiem/fibonacci

Then run main.go file.

License

This project is licensed under the MIT license.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Provides an easy way to initialize the server
Provides an easy way to initialize the server
API Logic
API Logic

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL