{"id":36874455,"url":"https://github.com/goradd/gofile","last_synced_at":"2026-01-12T15:05:23.530Z","repository":{"id":34944014,"uuid":"163348276","full_name":"goradd/gofile","owner":"goradd","description":"Gofile is a module-aware file utility for GO","archived":false,"fork":false,"pushed_at":"2025-07-08T23:42:14.000Z","size":99,"stargazers_count":2,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-14T14:46:10.423Z","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/goradd.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,"zenodo":null}},"created_at":"2018-12-28T00:40:27.000Z","updated_at":"2025-07-08T23:40:40.000Z","dependencies_parsed_at":"2025-07-09T00:32:31.385Z","dependency_job_id":"2417613c-3df7-4f51-8d14-b12911ffebc8","html_url":"https://github.com/goradd/gofile","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/goradd/gofile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goradd%2Fgofile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goradd%2Fgofile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goradd%2Fgofile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goradd%2Fgofile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goradd","download_url":"https://codeload.github.com/goradd/gofile/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goradd%2Fgofile/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28340416,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2026-01-12T15:05:21.692Z","updated_at":"2026-01-12T15:05:23.519Z","avatar_url":"https://github.com/goradd.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Build Status](https://img.shields.io/github/actions/workflow/status/goradd/gofile/go.yml?branch=main)\n# gofile\n\ngofile is a go module aware file and directory manipulation tool primarily useful for building go applications and libraries. \n\nAny directory can be represented as a module name,\nfollowed by a subdirectory and the real path of the module will be substituted for \nthe module name. Path names should use forward slashes to separate directories, and you can substitute \nenvironment variables into the path names using $VAR, or ${VAR} syntax.\n\ngofile is particularly useful for making build scripts for cross-platform projects. The cross-platform feature allows\nyou to create command-line scripts that will work on Windows and Unix based systems. The module aware feature\nallows you to specify a path relative to a module's location, simply by starting the path with the module specifier.\n\nIf you put \"replace\" statements in the go.mod file, gofile will honor those too. \nFor example, if your go.mod file has the following replace statement:\n\n`\nreplace github.com/myproj/proj =\u003e /proj-src\n`\n\nand you execute the following command from within the source tree of the go.mod file:\n\n`\ngofile copy github.com/myproj/proj/README.md /a/b/\n`\n\ngofile will copy the README.md file from /proj-src to the /a/b/ directory.\n\ngofile exports the ModulePaths() function as a library so you can build your own module aware tools. \n\nWhen specifying files using glob patterns (i.e *.txt), surround the file specifier with quotes\nso that gofile will process the pattern rather than the operating system.\n\n`\ngofile remove \"github.com/myproj/proj/*.tmp\"\n`\n## Installation\n\n```shell\ngo install github.com/goradd/gofile@latest\n```\n\n## Usage\n\n```shell\ngofile \u003ccommand\u003e \u003cargs...\u003e [options] \n```\n\n## Commands\n\nWith most of the following commands, -v will output status information while gofile is running.\n\n-x specifies what to exclude when expanding a path that uses * or ? expansions. Note that the * pattern\ndoes not match the path separator, so it only expands one level deep. The exclude pattern can include wild\ncards like * and ?, but it will only compare against the last item in a path. For example, if you have\nthe following directories in the /tmp directory:\n\n- test1\n- test2\n\nThen specifying `-x test2 /tmp/*` will result in only /tmp/test1 being used.\n\n-o will force \n\n### Help\n```shell\ngofile -h\n```\n\nwill print a complete description of the options and arguments of gofile.\n\n### Path\nOutputs the absolute path of a go module aware path. If the module is not\nfound, it outputs the path unchanged.\n\nUsage:\n```shell\ngofile path \u003csrc\u003e \n```\n\n### Copy\nCopies a file or directory to another file or directory.\n\nUsage:\n```shell\ngofile copy [-x excludes...] [-o|-n] \u003csrc\u003e \u003cdest\u003e \n```\n-x specifies names of files or directories you want to exclude from the source. This will match\nfile patterns as well. This is useful when copying whole directories but needing to exclude specific\ntypes of files from the process.\n\nNormally, a previously existing file will not be overwritten, and a previously existing directory will not be\ndeleted first but rather files will be added that are not present in the directory. The -o option will force\nan overwrite of previously existing files, and the -n option will overwrite only if the new file is newer than\nthe old one. If you want to replace a previously existing directory, use the remove command described below first.\n\n### Generate\nRuns go generate on the given file.\n\nUsage:\n```shell\ngofile generate [-x excludes...] \u003csources...\u003e\n\n```\n\n-x specifies names of files or directories you want to exclude from the source. This is useful when\nexpanding a directory using '*'.\n\n### Mkdir\nCreates the named directory if it does not exist. Sets it to be writable.\n\nUsage:\n```shell\ngofile mkdir \u003cdest\u003e\n```\n\n### Remove\nDeletes the named directories or files.\n\nUsage:\n```shell\ngofile remove [-x excludes...] \u003cdest...\u003e \n```\n\n-x specifies names of files or directories you want to exclude from the destination. This is useful when\nexpanding a directory using '*'.\n\n### GZip\n\nCompresses the given files using the GZip method.\n\nIf a directory is specified, then the files inside that directory are individually\ncompressed. This will recursively do the same to directories within the specified directory.\n\nCompressed files are placed in the same directory as the source file, and the\nfile name is appended with \".gz\". If a file already has a \".gz\" extension, gofile will\nassume the file is already compressed and skip it.\n\nUsage:\n```shell\ngofile gzip [-d] [-q level] [-x excludes...] \u003cdest...\u003e \n```\n\n-x specifies names of files or directories you want to exclude from compression. For exmaple, \n\"-x *.txt\" will prevent all files ending in \".txt\" from being compressed. Specifying the name\nof a directory will exclude all the files within that directory.\n\n-d will delete the source file after being compressed. Excluded files specified in the \n-x option are not removed.\n\n-q specifies the compression level. Default is 9, which is the maximum.\n\n### Brotli\n\nCompresses the given files using the Brotli method.\n\nIf a directory is specified, then the files inside that directory are individually\ncompressed. This will recursively do the same to directories within the specified directory.\n\nCompressed files are placed in the same directory as the source file, and the\nfile name is appended with \".br\". If a file already has a \".br\" extension, gofile will\nassume the file is already compressed and skip it.\n\nUsage:\n```shell\ngofile brotli [-d] [-q level] [-x excludes...] \u003cdest...\u003e \n```\n\n-x specifies names of files or directories you want to exclude from compression. For exmaple,\n\"-x *.txt\" will prevent all files ending in \".txt\" from being compressed. Specifying the name\nof a directory will exclude all the files within that directory.\n\n-d will delete the source file after being compressed. Excluded files specified in the\n-x option are not removed.\n\n-q specifies the compression level. Default is 11, which is the maximum.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoradd%2Fgofile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoradd%2Fgofile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoradd%2Fgofile/lists"}