Skip to content

πŸŒ‡ High Performance Fibonacci Abstraction Layer + API

License

Notifications You must be signed in to change notification settings

UltiRequiem/fibosi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

22 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Fibonacci

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

Endpoints

/

http://localhost:3000/9

{ "number": 34 }

/sequence

http://localhost:3000/sequence/9

{ "numbers": [0, 1, 1, 2, 3, 5, 8, 13, 21] }

Run The API

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

Run it πŸ‘‡

fibonacci -p 8080
  • Using Binary from Releases

You can get the build of the project in releases.

  • From Source
git clone https://github.com/UltiRequiem/fibonacci

Then run main.go file.

Support

Open an Issue, I will check it a soon as possible πŸ‘€

If you want to hurry me up a bit send me a tweet πŸ˜†

Consider supporting me on Patreon if you like my work πŸ™

Don't forget to start the repo ⭐

Authors

Eliaz Bobadilla - Creator and Maintainer πŸ’ͺ

See also the full list of contributors who participated in this project ✨

Licence

Licensed under the MIT License πŸ“„