README
¶
Fibonacci
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
¶
There is no documentation for this package.
Click to show internal directories.
Click to hide internal directories.