{"id":37217808,"url":"https://github.com/chixm/filedownloader","last_synced_at":"2026-01-15T01:03:20.170Z","repository":{"id":54360385,"uuid":"291379115","full_name":"chixm/filedownloader","owner":"chixm","description":"Golang File Downloader from Internet URL","archived":false,"fork":false,"pushed_at":"2025-03-09T04:57:39.000Z","size":3799,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-09T05:25:27.153Z","etag":null,"topics":["downloader","filedownloader"],"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/chixm.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-08-30T01:39:45.000Z","updated_at":"2025-03-09T04:57:42.000Z","dependencies_parsed_at":"2024-06-21T09:04:40.545Z","dependency_job_id":null,"html_url":"https://github.com/chixm/filedownloader","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/chixm/filedownloader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chixm%2Ffiledownloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chixm%2Ffiledownloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chixm%2Ffiledownloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chixm%2Ffiledownloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chixm","download_url":"https://codeload.github.com/chixm/filedownloader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chixm%2Ffiledownloader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28441009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:55:22.719Z","status":"ssl_error","status_checked_at":"2026-01-15T00:55:20.945Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["downloader","filedownloader"],"created_at":"2026-01-15T01:03:18.999Z","updated_at":"2026-01-15T01:03:20.157Z","avatar_url":"https://github.com/chixm.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# filedownloader\n Download File from Internet\n\n# Multipurpose File Downloader for Go\n- Easy to download files from internet\n- Progress Channel to receive downloading progress\n- Multiple Download with Multiple Thread\n- Able to configure Logging Function\n\n\n# Import\nimport github.com/chixm/filedownloader\n\n# How to use \n## Example1 Most Simple Usage. Download URL file to local File Example. \n```\n\tfdl := filedownloader.New(nil)\n\tuser, _ := user.Current()\n\terr := fdl.SimpleFileDownload(`https://golang.org/pkg/net/http/`, user.HomeDir+`/fuso.html`)\n\tif err != nil {\n\t\tlog.Println(err)\n\t}\n```\n\n## Example2: Multiple Files Download From Internet\nSimply, put Url and local file path to Download structure slice and call MultipleFileDownload\n```\n\tfdl := New(nil)\n\tuser, _ := user.Current()\n\t// Download Progress Observer\n\tvar downloadFiles []*Download\n\tdownloadFiles = append(downloadFiles, \u0026Download{URL: `https://files.hareruyamtg.com/img/goods/L/M21/EN/0001.jpg`, LocalFilePath: user.HomeDir + `/ugin.jpg`})\n\tdownloadFiles = append(downloadFiles, \u0026Download{URL: `https://files.hareruyamtg.com/img/goods/L/ELD/EN/BRAWL0329.jpg`, LocalFilePath: user.HomeDir + `/korvold.jpg`})\n\terr := fdl.MultipleFileDownload(downloadFiles)\n\tif err != nil {\n\t\tt.Error(err)\n\t}\n```\n\n## Self defined Log functions\nFUSO writes log by Golang \"log\" library by default.\nYou can configure Config and set your own logger.\n\n```\nconf := Config{logfunc: myLogger}\n\tfileDownloader := New(\u0026conf)\n\t// downloading to use home\n\tuser, _ := user.Current()\n\tfileDownloader.SimpleFileDownload(`https://golang.org/pkg/net/http/`, user.HomeDir+`/fuso.html`)\n\n...\n\nfunc myLogger(params ...interface{}) {\n\tlog.Println(`log prefix`, params)\n}\n\n```\n\n## Configure RequiresDetailProgress And Receive Progress\nYou can show downloading progress and downloading speed if you need.\nSet RequiresDetailProgress: true in Config and write channel receives progress data.\n\nSee example below,\n```\n\t// default setting of RequiresDetailProgress is false, you need to set it true if you need download progress.\n\tconf := Config{logfunc: myLogger, MaxDownloadThreads: 1, DownloadTimeoutMinutes: 3, MaxRetry: 3, RequiresDetailProgress: true}\n\tfileDownloader := New(\u0026conf)\n\n\tdone := make(chan int)\n\t// if you set RequiresDetailProgress = true, you can receive progress from channel\n\tgo func() {\n\tLOOP:\n\t\tfor {\n\t\t\tselect {\n\t\t\tcase speed := \u003c-fileDownloader.DownloadBytesPerSecond:\n\t\t\t\t// DownloadBytesPerSecond Channel can receive how fast the download is running.\n\t\t\t\tlog.Println(fmt.Sprintf(`%d bytes/sec`, speed))\n\t\t\tcase progress := \u003c-fileDownloader.ProgressChan:\n\t\t\t\t// Progress Channel (ProgressChan) receives how much download has progressed.\n\t\t\t\tlog.Println(fmt.Sprintf(`%f percent has done`, progress)) // ex. 10.5 percent has done\n\t\t\tcase \u003c-done:\n\t\t\t\tbreak LOOP // escape from forever loop\n\t\t\t}\n\t\t}\n\t}()\n\n\t// downloading file to use home directory\n\tuser, _ := user.Current()\n\t// test download file 512MB\n\terr := fileDownloader.SimpleFileDownload(`http://ipv4.download.thinkbroadband.com/512MB.zip`, user.HomeDir+`/512.zip`)\n\tif err != nil {\n\t\tdone \u003c- 1\n\t}\n\tif fileDownloader.err != nil {\n\t\tlog.Println(fileDownloader.err)\n\t}\n\tdone \u003c- 0\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchixm%2Ffiledownloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchixm%2Ffiledownloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchixm%2Ffiledownloader/lists"}