{"id":22397000,"url":"https://github.com/atrox/homedir","last_synced_at":"2025-07-31T12:31:31.418Z","repository":{"id":57481733,"uuid":"106393342","full_name":"Atrox/homedir","owner":"Atrox","description":"Go library for detecting and expanding the user's home directory","archived":false,"fork":false,"pushed_at":"2017-10-11T10:29:15.000Z","size":2,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-14T09:32:21.412Z","etag":null,"topics":["golang","home-directory","homedir"],"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/Atrox.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":"2017-10-10T08:59:55.000Z","updated_at":"2021-11-27T22:19:35.000Z","dependencies_parsed_at":"2022-09-02T06:03:23.319Z","dependency_job_id":null,"html_url":"https://github.com/Atrox/homedir","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/Atrox%2Fhomedir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atrox%2Fhomedir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atrox%2Fhomedir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atrox%2Fhomedir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Atrox","download_url":"https://codeload.github.com/Atrox/homedir/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228242556,"owners_count":17890481,"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","home-directory","homedir"],"created_at":"2024-12-05T06:10:10.114Z","updated_at":"2024-12-05T06:10:10.723Z","avatar_url":"https://github.com/Atrox.png","language":"Go","readme":"# HomeDir\n\n[![Build Status](https://img.shields.io/travis/Atrox/homedir.svg?style=flat-square)](https://travis-ci.org/Atrox/homedir)\n[![Coverage Status](https://img.shields.io/coveralls/Atrox/homedir.svg?style=flat-square)](https://coveralls.io/r/Atrox/homedir)\n[![Go Report Card](https://goreportcard.com/badge/github.com/atrox/homedir?style=flat-square)](https://goreportcard.com/report/github.com/atrox/homedir)\n[![GoDoc](https://img.shields.io/badge/godoc-reference-5272B4.svg?style=flat-square)](https://godoc.org/github.com/Atrox/homedir)\n\n\u003e This library is based on and fully compatible with [mitchellh/go-homedir](https://github.com/mitchellh/go-homedir) but uses `os/user` because since go 1.9 there is no longer cgo compilation required.\n\n## Installation\n\n```sh\ngo get -u github.com/atrox/homedir\n# or with dep\ndep ensure -add github.com/atrox/homedir\n```\n\n## Usage\n\nUsage is incredibly simple, just call `homedir.Dir()` to get the home directory\nfor a user, and `homedir.Expand(path string)` to expand the `~` in a path to the home\ndirectory.\n\n## Example\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n\n    \"github.com/atrox/homedir\"\n)\n\nfunc main() {\n    dir, err := homedir.Dir()\n    if err != nil {\n        panic(err)\n    }\n    fmt.Printf(\"'%s' is your users home directory\\n\", dir)\n\n    path, err := homedir.Expand(\"~/.config\")\n    if err != nil {\n        panic(err)\n    }\n    fmt.Printf(\"'%s' is the expanded path to the .config directory\\n\", path)\n}\n```\n\n## Contributing\n\nEveryone is encouraged to help improve this project. Here are a few ways you can help:\n\n- [Report bugs](https://github.com/atrox/homedir/issues)\n- Fix bugs and [submit pull requests](https://github.com/atrox/homedir/pulls)\n- Write, clarify, or fix documentation\n- Suggest or add new features\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatrox%2Fhomedir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatrox%2Fhomedir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatrox%2Fhomedir/lists"}