{"id":13563986,"url":"https://github.com/storyicon/gos","last_synced_at":"2025-04-07T11:07:00.847Z","repository":{"id":57482182,"uuid":"187610510","full_name":"storyicon/gos","owner":"storyicon","description":"Gos: Armed Golang 💪 ( solutions for go module, goproxy, cross compilation, etc.)","archived":false,"fork":false,"pushed_at":"2020-10-19T09:41:56.000Z","size":468,"stargazers_count":375,"open_issues_count":2,"forks_count":25,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-03-31T09:07:57.612Z","etag":null,"topics":["chain","cross-compilation","go","golang","gomodule","goproxy","grpc","mod","module","proto","tools"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/storyicon.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":"2019-05-20T09:32:42.000Z","updated_at":"2025-02-21T04:50:30.000Z","dependencies_parsed_at":"2022-09-02T06:11:37.156Z","dependency_job_id":null,"html_url":"https://github.com/storyicon/gos","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/storyicon%2Fgos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/storyicon%2Fgos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/storyicon%2Fgos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/storyicon%2Fgos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/storyicon","download_url":"https://codeload.github.com/storyicon/gos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247640462,"owners_count":20971557,"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":["chain","cross-compilation","go","golang","gomodule","goproxy","grpc","mod","module","proto","tools"],"created_at":"2024-08-01T13:01:25.271Z","updated_at":"2025-04-07T11:07:00.828Z","avatar_url":"https://github.com/storyicon.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Gos: Armed Golang 💪 `v1.2`\n[![CircleCI](https://circleci.com/gh/storyicon/gos/tree/master.svg?style=svg)](https://circleci.com/gh/storyicon/gos/tree/master) [![Go Report Card](https://goreportcard.com/badge/github.com/storyicon/gos)](https://goreportcard.com/report/github.com/storyicon/gos)  [![Build Status](https://travis-ci.org/storyicon/gos.svg?branch=master)](https://travis-ci.org/storyicon/gos) [![GoDoc](https://godoc.org/github.com/storyicon/gos?status.svg)](https://godoc.org/github.com/storyicon/gos) [![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/storyicon/Lobby)\n\n![gos](https://raw.githubusercontent.com/storyicon/gos/master/docs/screenshot/gos.png)\n\nThe current gos is still an alpha version, welcome more heroes to comment and improve it 🍓, you can add more commands to it, or modify something to make it perform better.\n\nYou can download the compiled binary program here: [Release Page](https://github.com/storyicon/gos/releases/)\n\n  - [Brief introduction](#brief-introduction)\n  - [How to start](#how-to-start)\n  - [What GOS can do:](#what-gos-can-do)           \n          - [1. Fully compatible with Go native commands](#1-fully-compatible-with-go-native-commands)           \n          - [2. Simpler Cross-Compilation](#2-simpler-cross-compilation)           \n          - [3. Rapid generation of .proto](#3-rapid-generation-of-proto)           \n          - [4. Go proxy solution](#4-go-proxy-solution)           \n\n## :beer: News\n\u003e :moon: Some fixes and WebAssembly support. [What's new in v1.2](https://github.com/storyicon/gos/blob/master/docs/something-new-in-v1.2.md) (2019-8-1)                \n\n\u003e  :japanese_ogre: Please use golang with version \u003e= `1.12`. [about \"go: cannot find main module\"](https://github.com/storyicon/gos/blob/master/docs/go-version.md)\n\n\u003e :astonished: Is there still a **dial-tcp-timeout**? Starting with v1.1, you can use GOS_UPSTREAM_ADDRESS to specify the upstream proxy address: [What's new in v1.1](https://github.com/storyicon/gos/blob/master/docs/something-new-in-v1.1.md) (2019-5-30)\n\n\u003e  🌷 Here's something about \"GOPROXY supports comma-separated list of URLs\": [On GOPROXY](https://github.com/storyicon/gos/blob/master/docs/on-goproxy.md)  (2019-5-23)\n\n\n## 🦄 Brief introduction\n\nfrom now on, use gos instead of go:\n\n```bash\ngo get =\u003e gos get\ngo build =\u003e gos build\ngo run =\u003e gos run\ngo ... =\u003e gos ...\n```\n\ngos is compatible with all go commands and has go mod/get equipped with smart `GOPROXY`, \nit automatically distinguishes between private and public repositories \nand uses `GOPROXY` to download your lost package when appropriate.\n\ngos has a few extra commands to enhance your development experience:\n\n```bash\n  cross      agile and fast cross compiling\n  proto      quick and easy compilation of proto files\n```\n\nYou can use `-h` on these sub commands to get more information.              \n\n## 🐋 How to start\n\nThis can't be simpler.              \nAccording to your system type, download the zip file from the [release page](https://github.com/storyicon/gos/releases/), unzip, rename the binaries to `gos` and put it in your `$PATH`. Then use `gos` as if you were using the `go` command.               \nYou can also download the source code and compile it using `go build -o gos main.go`                \n\nNote: The prerequisite for gos to work properly is that the [go binary](https://golang.org/dl/) is in your $PATH. If you need to use the `gos proto` command, you need the [protoc binary](https://github.com/protocolbuffers/protobuf/releases) too.              \n\n## :tangerine: What GOS can do: \n\n### 1. Fully compatible with Go native commands \n\nYou can use `gos` just like you would with the `go` command. Compatible with all flags and arguments, such as the following:\n\n```bash\ngo get -u -v github.com/xxxx/xxxx\n=\u003e\ngos get -u -v github.com/xxxx/xxxx\n```\n\n### 2. Simpler Cross-Compilation\n\nYou can use `gos cross` command for simpler cross-compilation:\n\n```bash\n# Compile Linux platform binaries for the current system architecture\n# For example, if your computer are amd64, it will compile main.go into the binary of linux/amd64 architecture.\ngos cross main.go linux\n\n# Specify the build platform and architecture\ngos cross main.go linux amd64\ngos cross main.go linux arm\ngos cross main.go linux 386\ngos cross main.go windows amd64\ngos cross main.go darwin 386\n\n# Compiling binary files for all architectures on the specified platform\ngos cross main.go linux all\ngos cross main.go windows all\n\n# Compiling binary files for all platforms on the specified architecture\ngos cross main.go all amd64\n\n# Trying to compile binary files for all platforms and architectures\ngos cross all all\n\n# Compile with standard go build flags\ngos cross -tags=\"prod\" -ldflags=\"-s -w\" -a main.go all all\n\n# Compile with error info printed\ngos cross -e main.go all all\n\n# Compile with CGO enabled\nCGO_ENABLED=1 gos cross all all\n```\n\nGos uses parallel compilation, very fast 🚀, but still depends on the configuration of your operating system.\n\nmore information: `gos cross -h`\n\n### 3. Rapid generation of .proto\n\nThis feature may only be useful to RPC developers. You can compile proto files more easily, as follows:\n\n```bash\n# Compile a single file\ngos proto helloworld.proto\n\n# Compile all proto files under the current folder (excluding subfolders)\ngos proto all\n\n# Compile all proto files in the current directory and all subdirectories\ngos proto all/all\n```\n\nOf course, the precondition is that you have a [protoc binary](https://github.com/protocolbuffers/protobuf/releases) in your $PATH.\n\nmore information: `gos proto -h`\n\n### 4. Go proxy solution\n\nThere is a dilemma here. If you don't use `GOPROXY`, there may be a large number of Package pull timeouts (network reasons) or non-existence (repository rename, delete or migrate), like the following:\n```bash\nunrecognized import path \"golang.org/x/net\" (https fetch: Get https://golang.org/x/net?go-get=1: \ndial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)\n```\n```\ngo: google.golang.org/grpc@v1.21.0: unrecognized import path \"google.golang.org/grpc\" (https fetch: Get https://google.golang.org/grpc?go-get=1: dial tcp 216.239.37.1:443: i/o timeout)\n```\n\nIf use `GOPROXY`, you will not be able to pull the private repositories (github, gitlab, etc) properly, like that:\n```\ngo get github.com/your_private_repo: unexpected status (https://athens.azurefd.net/github.com/your_private_repo/@v/list): 500 Internal Server Error\n```\n\nGOS strengthens all of GO's native commands, no matter it's go mod/get/build/run/....Any situation that might cause a package pull, gos will intelligently determine whether the current repository to be pulled needs to use `GOPROXY`.\n\n\n**Now, live your thug life 😎**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstoryicon%2Fgos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstoryicon%2Fgos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstoryicon%2Fgos/lists"}