{"id":26546864,"url":"https://github.com/changsongl/isodd","last_synced_at":"2025-03-22T05:28:09.221Z","repository":{"id":112080537,"uuid":"324339073","full_name":"changsongl/isodd","owner":"changsongl","description":"isodd is package to check whether a number or string is odd. It is written in Golang. Same as is-odd in js.","archived":false,"fork":false,"pushed_at":"2020-12-26T11:10:36.000Z","size":3467,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-18T08:39:36.699Z","etag":null,"topics":["golang","is-odd","is-odd-or-even"],"latest_commit_sha":null,"homepage":"","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/changsongl.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-25T10:17:44.000Z","updated_at":"2020-12-26T11:10:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"ca663443-0115-4eaf-871c-d1b794f989b0","html_url":"https://github.com/changsongl/isodd","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/changsongl%2Fisodd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/changsongl%2Fisodd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/changsongl%2Fisodd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/changsongl%2Fisodd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/changsongl","download_url":"https://codeload.github.com/changsongl/isodd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244912802,"owners_count":20530764,"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","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":["golang","is-odd","is-odd-or-even"],"created_at":"2025-03-22T05:28:08.819Z","updated_at":"2025-03-22T05:28:09.216Z","avatar_url":"https://github.com/changsongl.png","language":"Go","readme":"# isodd\n\n### Introduction:\nisodd is for checking whether a integer, float or string is odd.\nIt is similar with the is-odd package which is written in javascript.\nThe package is 100% test coverage.\n\n### How to use it:\n\n````shell script\n# download package with go mod\ngo get github.com/changsongl/isodd\n\n# import package in your program\nimport \"github.com/changsongl/isodd\"\n````\n\n````go\n// some examples\n\nvar strNum1 string = \"1\"\nisOdd, err := isodd.String(strNum1) // true, nil\nvar strNum2 string = \"0\"\nisOdd, err := isodd.String(strNum2) // false, nil\n\nvar num int64 = -1\nisOdd := isodd.Int64(num) // true\nvar num int64 = 0\nisOdd := isodd.Int64(num) // false\n\n// float type: it convert float to int type and \n// then check whether it is odd\nvar num float32 = -1.32\nisOdd := isodd.Float32(num) // true \nvar num float32 = 0\nisOdd := isodd.Int64(num) // false\n\nvar num interface = \"0\"\nisOdd := isodd.Interface(num) // false\n````\n\n### Code Coverage:\n````shell script\ngo test -c -covermode=count -coverpkg ./...\n\n./isodd.test \n\nPASS\ncoverage: 100.0% of statements in ./...\n````\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchangsongl%2Fisodd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchangsongl%2Fisodd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchangsongl%2Fisodd/lists"}