{"id":15497381,"url":"https://github.com/heapwolf/go-indexof","last_synced_at":"2025-08-01T23:05:30.747Z","repository":{"id":31470352,"uuid":"35034371","full_name":"heapwolf/go-indexof","owner":"heapwolf","description":"The IndexOf() method returns the first index at which a given element can be found in the slice, or -1 if it is not present.","archived":false,"fork":false,"pushed_at":"2020-10-22T10:07:00.000Z","size":3,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-18T14:49:15.413Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/heapwolf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-04T12:48:34.000Z","updated_at":"2021-07-18T08:08:51.000Z","dependencies_parsed_at":"2022-08-03T15:18:05.768Z","dependency_job_id":null,"html_url":"https://github.com/heapwolf/go-indexof","commit_stats":null,"previous_names":["0x00a/go-indexof","hij1nx/go-indexof"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/heapwolf/go-indexof","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heapwolf%2Fgo-indexof","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heapwolf%2Fgo-indexof/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heapwolf%2Fgo-indexof/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heapwolf%2Fgo-indexof/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heapwolf","download_url":"https://codeload.github.com/heapwolf/go-indexof/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heapwolf%2Fgo-indexof/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268310722,"owners_count":24230182,"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-08-01T02:00:08.611Z","response_time":67,"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":[],"created_at":"2024-10-02T08:33:17.317Z","updated_at":"2025-08-01T23:05:30.691Z","avatar_url":"https://github.com/heapwolf.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SYOPSIS\nThe IndexOf() method returns the first index at which a given element can\nbe found in the slice, or -1 if it is not present. The only requirement of\nthis function is that the second argument must be a slice.\n\n# INSTALL\n```bash\ngo get github.com/hij1nx/go-indexof\n```\n\n# USAGE\n```go\nimport \"github.com/hij1nx/go-indexof\"\n\nvar v = \"bazz\"\nvar a = []string{\"bar\", \"foo\", \"bazz\"}\n\nvar i = IndexOf(v, a) // \"i\" is assigned \"2\"\n\nvar v = 20\nvar a = []int{10, 20, 30}\n\nvar i = IndexOf(v, a) // \"i\" is assigned \"1\"\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheapwolf%2Fgo-indexof","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheapwolf%2Fgo-indexof","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheapwolf%2Fgo-indexof/lists"}