{"id":21296318,"url":"https://github.com/liweiyi88/dummyfile","last_synced_at":"2025-03-15T17:24:41.618Z","repository":{"id":65566659,"uuid":"594680842","full_name":"liweiyi88/dummyfile","owner":"liweiyi88","description":"Create a fixed-size dummy file with random contents","archived":false,"fork":false,"pushed_at":"2023-01-29T11:37:46.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-22T07:18:35.220Z","etag":null,"topics":["dummy","dummy-files","go","golang"],"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/liweiyi88.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":"2023-01-29T10:04:02.000Z","updated_at":"2023-01-29T11:36:19.000Z","dependencies_parsed_at":"2023-02-15T22:30:47.003Z","dependency_job_id":null,"html_url":"https://github.com/liweiyi88/dummyfile","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/liweiyi88%2Fdummyfile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liweiyi88%2Fdummyfile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liweiyi88%2Fdummyfile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liweiyi88%2Fdummyfile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liweiyi88","download_url":"https://codeload.github.com/liweiyi88/dummyfile/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243764213,"owners_count":20344386,"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":["dummy","dummy-files","go","golang"],"created_at":"2024-11-21T14:25:50.997Z","updated_at":"2025-03-15T17:24:41.597Z","avatar_url":"https://github.com/liweiyi88.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GoDoc](https://godoc.org/github.com/liweiyi88/dummyfile?status.svg)](https://godoc.org/github.com/liweiyi88/dummyfile)\n![tests](https://github.com/liweiyi88/dummyfile/actions/workflows/tests.yaml/badge.svg)\n[![codecov](https://codecov.io/gh/liweiyi88/dummyfile/branch/main/graph/badge.svg?token=ROIDLHX41V)](https://codecov.io/gh/liweiyi88/dummyfile)\n[![Go Report Card](https://goreportcard.com/badge/github.com/liweiyi88/dummyfile)](https://goreportcard.com/report/github.com/liweiyi88/dummyfile)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/liweiyi88/dummyfile/blob/main/LICENSE.md)\n\nDummyfile is a cli tool/package for creating a fixed-size dummy file with random contents.\n\n## Usage\n\n### Install as package\n`go get -u github.com/liweiyi88/dummyfile/dummyfile`\n\nThen use it in your code\n```\nimport \"github.com/liweiyi88/dummyfile/dummyfile\"\n\nfunc main() {\n    file, err := os.Create(path)\n    if err != nil {\n        return fmt.Errorf(\"failed to create dummy file: %v\", err)\n    }\n\n    defer func() {\n        err := file.Close()\n        if err != nil {\n            log.Printf(\"failed to close file: %s\", file.Name())\n        }\n    }()\n\n    // as the Create method accepts the io.Writer.\n    // you have the flexibility to test not only the file but any io.Writer.\n    err := dummyfile.Create(file, 100*dummyfile.GB)\n    //....\n}\n```\n\n### Install as binary\n`dummyfile` binaries are available in https://github.com/liweiyi88/dummyfile/releases. Use the latest version of the binary that is suitable to your OS.\nAfter downloading the binary and move it to the folder that is in your $PATH env var (e.g. `/usr/local/bin/dummyfile`), give it executable permissions (e.g. `sudo chmod +x /usr/local/bin/dummyfile`). Then you should be able to run it:\n```\n$ dummyfile /path/to/dummy.txt --size 100gb\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliweiyi88%2Fdummyfile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliweiyi88%2Fdummyfile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliweiyi88%2Fdummyfile/lists"}