{"id":13564166,"url":"https://github.com/mitchellh/go-homedir","last_synced_at":"2026-05-21T13:30:17.188Z","repository":{"id":19858472,"uuid":"23121609","full_name":"mitchellh/go-homedir","owner":"mitchellh","description":"Go library for detecting and expanding the user's home directory without cgo.","archived":true,"fork":false,"pushed_at":"2024-03-21T10:31:41.000Z","size":22,"stargazers_count":1415,"open_issues_count":6,"forks_count":119,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-02-15T06:54:12.674Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://gist.github.com/mitchellh/90029601268e59a29e64e55bab1c5bdc","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/mitchellh.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":"2014-08-19T18:44:22.000Z","updated_at":"2025-02-11T21:31:19.000Z","dependencies_parsed_at":"2024-06-18T11:18:00.845Z","dependency_job_id":null,"html_url":"https://github.com/mitchellh/go-homedir","commit_stats":{"total_commits":23,"total_committers":11,"mean_commits":2.090909090909091,"dds":0.4782608695652174,"last_synced_commit":"af06845cf3004701891bf4fdb884bfe4920b3727"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchellh%2Fgo-homedir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchellh%2Fgo-homedir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchellh%2Fgo-homedir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchellh%2Fgo-homedir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mitchellh","download_url":"https://codeload.github.com/mitchellh/go-homedir/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240108713,"owners_count":19749083,"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-01T13:01:27.430Z","updated_at":"2026-05-21T13:30:17.078Z","avatar_url":"https://github.com/mitchellh.png","language":"Go","funding_links":[],"categories":["开源类库","Misc","Open source library","Go"],"sub_categories":["未归类","Not Categorized"],"readme":"# go-homedir\n\nThis is a Go library for detecting the user's home directory without\nthe use of cgo, so the library can be used in cross-compilation environments.\n\nUsage is incredibly simple, just call `homedir.Dir()` to get the home directory\nfor a user, and `homedir.Expand()` to expand the `~` in a path to the home\ndirectory.\n\n**Why not just use `os/user`?** The built-in `os/user` package requires\ncgo on Darwin systems. This means that any Go code that uses that package\ncannot cross compile. But 99% of the time the use for `os/user` is just to\nretrieve the home directory, which we can do for the current user without\ncgo. This library does that, enabling cross-compilation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitchellh%2Fgo-homedir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmitchellh%2Fgo-homedir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitchellh%2Fgo-homedir/lists"}