Added unit tests and workflow call for same
This commit is contained in:
@@ -46,8 +46,14 @@ func HttFibonacci(w http.ResponseWriter, request *http.Request) {
|
||||
} else {
|
||||
fmt.Printf("Received request for Fibonacci Sequence Number %d\n",
|
||||
seq)
|
||||
value, error := MyFibonacci(seq)
|
||||
if error != nil {
|
||||
fmt.Printf("Error trying to Fibonacci %d: %s", seq, error)
|
||||
fmt.Fprintf(w, "Error trying to Fibonacci %d: %s", seq, error)
|
||||
} else {
|
||||
fmt.Fprintf(w, "Fibonacci sequence index [%d]: %d\n",
|
||||
seq, MyFibonacci(seq))
|
||||
seq, value)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user