{"id":13723033,"url":"https://github.com/mdempsky/unconvert","last_synced_at":"2025-04-04T09:08:39.822Z","repository":{"id":4165831,"uuid":"52119293","full_name":"mdempsky/unconvert","owner":"mdempsky","description":"Remove unnecessary type conversions from Go source","archived":false,"fork":false,"pushed_at":"2023-09-07T12:55:36.000Z","size":73,"stargazers_count":377,"open_issues_count":7,"forks_count":26,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-10-14T11:52:56.992Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdempsky.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}},"created_at":"2016-02-19T21:59:07.000Z","updated_at":"2024-10-05T15:19:05.000Z","dependencies_parsed_at":"2024-01-08T16:09:06.294Z","dependency_job_id":"971be305-b23c-460f-9c5d-fe85860f07ef","html_url":"https://github.com/mdempsky/unconvert","commit_stats":{"total_commits":72,"total_committers":11,"mean_commits":6.545454545454546,"dds":0.625,"last_synced_commit":"2661c2c99a9bc6c85eda5d933854b98fd25dfa35"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdempsky%2Funconvert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdempsky%2Funconvert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdempsky%2Funconvert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdempsky%2Funconvert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdempsky","download_url":"https://codeload.github.com/mdempsky/unconvert/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247149501,"owners_count":20891954,"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":[],"created_at":"2024-08-03T01:01:35.635Z","updated_at":"2025-04-04T09:08:39.801Z","avatar_url":"https://github.com/mdempsky.png","language":"Go","readme":"# About\n\nThe unconvert program analyzes Go packages to identify unnecessary\ntype conversions; i.e., expressions T(x) where x already has type T.\n\n# Install\n\n    go install github.com/mdempsky/unconvert@latest\n\n# Usage\n\n    $ unconvert -v bytes fmt\n    GOROOT/src/bytes/reader.go:117:14: unnecessary conversion\n                    abs = int64(r.i) + offset\n                               ^\n    GOROOT/src/fmt/print.go:411:21: unnecessary conversion\n            p.fmt.integer(int64(v), 16, unsigned, udigits)\n                               ^\n\n# Flags\n\nUsing the -v flag, unconvert will also print the source line and a\ncaret to indicate the unnecessary conversion's position therein.\n\nUsing the -apply flag, unconvert will rewrite the Go source files\nwithout the unnecessary type conversions.\n\nUsing the -all flag, unconvert will analyze the Go packages under all\npossible GOOS/GOARCH combinations, and only identify conversions that\nare unnecessary in all cases.\n\nE.g., syscall.Timespec's Sec and Nsec fields are int64 under\nlinux/amd64 but int32 under linux/386.  An int64(ts.Sec) conversion\nthat appears in a linux/amd64-only file will be identified as\nunnecessary, but it will be preserved if it occurs in a file that's\ncompiled for both linux/amd64 and linux/386.\n","funding_links":[],"categories":["Code Analysis","代碼分析","Code formatters","Linters","Go","代码分析","相关工具`go相关工具和插件`","Programming Languages","Libraries for creating HTTP middlewares","相关工具"],"sub_categories":["Routers","路由","Style and Patterns Checking","路由器","代码分析"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdempsky%2Funconvert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdempsky%2Funconvert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdempsky%2Funconvert/lists"}