{"id":16740457,"url":"https://github.com/flopp/go-getfile","last_synced_at":"2025-04-05T06:26:11.124Z","repository":{"id":257804299,"uuid":"864483343","full_name":"flopp/go-getfile","owner":"flopp","description":"Go module to download files","archived":false,"fork":false,"pushed_at":"2025-03-13T11:30:26.000Z","size":12,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T12:31:54.264Z","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/flopp.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":"2024-09-28T10:40:00.000Z","updated_at":"2025-03-13T11:30:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"1d4fc4ac-c6a8-451a-9aea-344f7cb3dff9","html_url":"https://github.com/flopp/go-getfile","commit_stats":null,"previous_names":["flopp/go-getfile"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flopp%2Fgo-getfile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flopp%2Fgo-getfile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flopp%2Fgo-getfile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flopp%2Fgo-getfile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flopp","download_url":"https://codeload.github.com/flopp/go-getfile/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247297424,"owners_count":20915842,"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-10-13T00:58:38.639Z","updated_at":"2025-04-05T06:26:11.107Z","avatar_url":"https://github.com/flopp.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-getfile\nGo module to download files\n\n```go\n// Create a getfile client\nclient := getfile.NewClient()\n\n// Use a custom user agent\nclient.SetUserAgent(\"my-user-agent\")\n\n// Set a delay, e.g. duration to wait before each download\nclient.SetDelay(1 * time.Second)\n\n// The free eBook \"An Introduction to Programming in Go\"\nurl := \"https://www.golang-book.com/public/pdf/gobook.pdf\"\ntargetFile := \"gobook.pdf\"\n\n// Download file from url,\n// overwrite existing target file\nif err := client.Get(url, targetFile); err != nil {\n    fmt.Printf(\"Download failed: %v\\n\", err)\n}\n\n// Download file from url,\n// but only if the target file doesn't exist already\nif err := client.GetIfNotExists(url, targetFile); err != nil {\n    fmt.Printf(\"Download failed: %v\\n\", err)\n}\n\n// Downfile file from url,\n// but only if the target files doesn't exist already or\n// it is older than the given time duration (24 hours)\nif err := client.GetIfOutdated(url, targetFile, 24 * time.Hour); err != nil {\n    fmt.Printf(\"Download failed: %v\\n\", err)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflopp%2Fgo-getfile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflopp%2Fgo-getfile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflopp%2Fgo-getfile/lists"}