mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-05-17 14:16:34 +00:00
Stacked on the modifications PR. Now that no live code path references
the per-package fetchers, the shared HTTP/parsing helpers, the
in-process normalizer, or the example template, delete them. Pure
deletion — no behavior change.
- ~93 per-package <pkg>/releases.js fetcher modules.
- _common/{brew,fetcher,git-tag,gitea,github,github-source,
githubish,githubish-source}.js shared HTTP/parsing helpers.
- _webi/normalize.js in-process normalization layer (cache files
arrive normalized from webicached).
- _example/releases.js fetcher template for new packages.
The Go cache daemon (webicached) is now the sole producer of release
metadata; the Node process never makes an upstream request.
title, homepage, tagline, alias, description
| title | homepage | tagline | alias | description |
|---|---|---|---|---|
| Go | https://golang.org | Go makes it easy to build simple, reliable, and efficient software. | go | See https://webinstall.dev/go |
Alias for https://webinstall.dev/go.
To update or switch versions, run webi go@stable (or @v1.21, @beta, etc).
Files
~/.config/envman/PATH.env
~/.local/opt/go/
~/go/
Cheat Sheet
Go is designed, through and through, to make Software Engineering easy. It's fast, efficient, reliable, and something you can learn in a weekend.
If you subscribe to The Zen of Python, you'll love > Go.
You may also want to install the Go IDE tooling: go-essentials.
Hello World
-
Make and enter your project directory
mkdir -p ./hello/cmd/hello pushd ./hello/ -
Initialize your
go.modto your git repository url:go mod init github.com/example/hello -
Create a
hello.gocat << EOF >> ./cmd/hello/hello.go package main import ( "fmt" ) func main () { fmt.Println("Hello, World!") } EOF -
Format, build, and run your
./hellogo fmt ./... go build -o hello ./cmd/hello/ ./helloYou should see your output:
> Hello, World!
How to run a Go program as a service
On Linux:
# Install serviceman (compatible with systemd)
webi serviceman
# go into your programs 'opt' directory
pushd ./hello/
# swap 'hello' and './hello' for the name of your project and binary
serviceman add --name 'hello' -- \
./hello
# Restart the logging service
sudo systemctl restart systemd-journald