Skip to content

🌇 High Performance Fibonacci Abstraction Layer + API

License

Notifications You must be signed in to change notification settings

sachasi/fibonacci

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fibonacci

GitMoji PkgGoDev License: MIT 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.

About

🌇 High Performance Fibonacci Abstraction Layer + API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 94.3%
  • Dockerfile 5.7%