{"id":19958034,"url":"https://github.com/monkrus/go-fibonacci","last_synced_at":"2026-06-10T17:31:23.156Z","repository":{"id":98016509,"uuid":"251336205","full_name":"monkrus/go-fibonacci","owner":"monkrus","description":"HTTP Server testing in Go","archived":false,"fork":false,"pushed_at":"2020-03-31T05:19:27.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-28T07:16:47.471Z","etag":null,"topics":["go","golang","http","http-server","testify"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/monkrus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-30T14:49:04.000Z","updated_at":"2020-03-31T05:19:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"c1a41cf1-f07f-47c4-b4e8-f7d696af06ec","html_url":"https://github.com/monkrus/go-fibonacci","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/monkrus/go-fibonacci","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkrus%2Fgo-fibonacci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkrus%2Fgo-fibonacci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkrus%2Fgo-fibonacci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkrus%2Fgo-fibonacci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monkrus","download_url":"https://codeload.github.com/monkrus/go-fibonacci/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkrus%2Fgo-fibonacci/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34163253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","http","http-server","testify"],"created_at":"2024-11-13T01:39:54.250Z","updated_at":"2026-06-10T17:31:23.132Z","avatar_url":"https://github.com/monkrus.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-fibonacci\nHTTP Server testing in Go\n\n\n1. Fibonacci function: In the sequence of  x,y,z numbers  number z returns the sum of x+y.\n   Our webserver returns the fibonacci sequence (or error) for any given number.\n\n# SETUP\n2. Create an endpoint (HandleFunc, \"/fib\", server by handleFib function )\n\n3. Start a server 8080 (ListenAndServe)\n\n4. Write a \"Response-Request\" function. We are getting a `num` parameter from request.(FormValue function)\n\n5. Need to convert into `int` since function takes `int` (FormValue)\n\n6. Atoi function returns `int` or error (StatusBadRequest)\n\n7. If convertion is good, returns a line\n\n8. Converting again: io.WriteString (int--\u003eline)\n\n10. Define Fib function\n\n11. Create cache and initialize it with init function.\n\n# TESTING\n\n1. Testing function Handle Fib (using HTTPPIE, curl etc.)\n\n2. Not testing a server, just a HandleFib function\n\n3. Http test has recorder\n\n4. Write test cases. We use `bytes` since response comes in bytes.\n\n5. Handler returns --serve http--\u003efake request\n\n6. Add cycle\n\n7. http-\u003erecorder\n\n8. Fake request (GET, sprintf)\n\n9. Call ServeHTTP\n-assert\n-body -\u003ereturns bytes\n-code status","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonkrus%2Fgo-fibonacci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonkrus%2Fgo-fibonacci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonkrus%2Fgo-fibonacci/lists"}