{"id":15294797,"url":"https://github.com/sergio16t/funky-go","last_synced_at":"2026-02-22T12:39:50.527Z","repository":{"id":61624002,"uuid":"537639062","full_name":"Sergio16T/funky-go","owner":"Sergio16T","description":"Functional Programming Package for Go Development.","archived":false,"fork":false,"pushed_at":"2024-07-10T19:59:45.000Z","size":34,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T12:44:48.240Z","etag":null,"topics":["functional-programming","go","golang","utilities"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/Sergio16T/funky_go","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sergio16T.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2022-09-16T22:38:54.000Z","updated_at":"2024-07-10T19:59:48.000Z","dependencies_parsed_at":"2024-10-23T14:01:36.190Z","dependency_job_id":null,"html_url":"https://github.com/Sergio16T/funky-go","commit_stats":{"total_commits":37,"total_committers":1,"mean_commits":37.0,"dds":0.0,"last_synced_commit":"f0636fa74a9208fdf6557bddba25bd0ac5eeb6ae"},"previous_names":["sergio16t/funky_go"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/Sergio16T/funky-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sergio16T%2Ffunky-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sergio16T%2Ffunky-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sergio16T%2Ffunky-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sergio16T%2Ffunky-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sergio16T","download_url":"https://codeload.github.com/Sergio16T/funky-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sergio16T%2Ffunky-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274647747,"owners_count":25324293,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"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":["functional-programming","go","golang","utilities"],"created_at":"2024-09-30T17:07:01.919Z","updated_at":"2025-10-23T20:48:30.667Z","avatar_url":"https://github.com/Sergio16T.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003ch1\u003eFunky Go\u003c/h1\u003e\n    \u003ch4\u003e\n    A Functional Programming package for Go development\n    \u003c/h4\u003e\n    \u003cp\u003e\n        \u003ca href=\"https://pkg.go.dev/github.com/Sergio16T/funky_go\"\u003e\n            \u003cimg alt=\"Go Reference\" src=\"https://pkg.go.dev/badge/github.com/gabriel-vasile/mimetype.svg\"\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://goreportcard.com/report/github.com/Sergio16T/funky_go\"\u003e\n            \u003cimg alt=\"go report A+\" src=\"https://goreportcard.com/badge/github.com/Sergio16T/funky_go\"/\u003e\n        \u003c/a\u003e\n        \u003ca href=\"LICENSE\"\u003e\n            \u003cimg alt=\"License\" src=\"https://img.shields.io/badge/License-MIT-green.svg\"\u003e\n        \u003c/a\u003e\n    \u003c/p\u003e\n    \u003cimg alt=\"Go Pilot\" src=\"./go-pilot.svg\" width=\"500px\" style=\"margin-top: -60px\"\u003e\n\u003c/div\u003e\n\n\n## Summary\nFunky Go includes Higher Order Functions in addition to other \nDeclarative utility Functions. The utils package provides utilities\nfor working with slices \u0026 arrays in Go.\n\n\n## Installation\n\n```\ngo get github.com/Sergio16T/funky_go@v0.1.8-beta\n```\n## Table of Contents\n\n- [Examples](#examples)\n\n\n## Examples\n\nReduce the given source array to a new array with duplicates removed\n```go\nsourceArray := []int{1, 1, 2, 3, 4, 5, 4}\nvar initialValue []int\n\nreduced := utils.Reduce(sourceArray, func(previousValue []int, element int) []int {\n\t\tif !utils.Contains(previousValue, element) {\n\t\t\tpreviousValue = append(previousValue, element)\n\t\t}\n\t\treturn previousValue\n\t}, initialValue)\n\n// reduced ~ [1, 2, 3, 4, 5]\n```\n\nFilter list of Disney characters to characters 30 or younger\n```go\ntype TestPerson struct {\n    name string\n    age  int\n}\n\nsourceArray := []TestPerson{{name: \"Mickey\", age: 30}, {name: \"Minnie\", age: 27}, {name: \"Goofy\", age: 22}, {name: \"Donald\", age: 32}}\n\nfiltered := utils.Filter(sourceArray, func(person TestPerson, index int) bool {\n    return person.age \u003c= 30\n})\n\n// filtered ~ []TestPerson{{name: \"Mickey\", age: 30}, {name: \"Minnie\", age: 27}, {name: \"Goofy\", age: 22}}\n\n```\n\nForEach person in the list add 5 years to their age\n```go\ntype TestPerson struct {\n    name string\n    age  int\n}\n\nsampleList := []TestPerson{{name: \"Mickey\", age: 30}, {name: \"Minnie\", age: 27}, {name: \"Goofy\", age: 22}, {name: \"Donald\", age: 32}}\n\nutils.ForEach(sampleList, func(person TestPerson, index int) {\n    sampleList[index].age = person.age + 5\n})\n\n// sampleList ~ []TestPerson{{name: \"Mickey\", age: 35}, {name: \"Minnie\", age: 32}, {name: \"Goofy\", age: 27}, {name: \"Donald\", age: 37}}\n\n```\n\nMap over each person in the list and return a new list containing the ages of all the characters + 5\n```go\ntype TestPerson struct {\n    name string\n    age  int\n}\n\nsampleList := []TestPerson{{name: \"Mickey\", age: 30}, {name: \"Minnie\", age: 27}, {name: \"Goofy\", age: 22}, {name: \"Donald\", age: 32}}\n\n\nmapped := utils.Map(sampleList, func(person TestPerson, index int) int {\n    agePlusFive := person.age + 5\n    return agePlusFive\n})\n\n// mapped ~  []int{35, 32, 27, 37}\n```\n\nFind the first value that passes the given predicate.\n\nReturns a pointer and the index of value in the given array\n(Nil pointer, index -1 if not found).\n```go\nsampleList := []int{1, 2, 3, 4, 5}\n\nfound, i := utils.Find(sampleList, func(num int, index int) bool {\n    return num == 2\n})\n\n// found ~ *int((*int)(0xc00001aba8))\n// i ~ 1\nif i == -1 {\n    log.Printf(\"No match was found\")\n} else {\n    log.Printf(\"Match %+v found at index %+v\\n\", *found, i)\n}\n```\n\nFindIndex of the first value in the array that passes the given predicate\n```go\nsampleList := []int{1, 2, 3, 4, 5}\n\nindex := utils.FindIndex(sampleList, func(num int, index int) bool {\n    return num == 2\n})\n\n// index ~ 1\n```\n\nFind Index Of Element in Source Array\n```go\nsampleList := []int{1, 2, 3, 4, 11, 5, 1, 2, 3, 2, 1, 0, 9}\n\nindex := utils.IndexOf(sampleList, 11)\n// index ~ 4\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergio16t%2Ffunky-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsergio16t%2Ffunky-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergio16t%2Ffunky-go/lists"}