Tag go

58 bookmarks have this tag.

2024-11-18

1596.

GitHub - 0xJacky/nginx-ui: Yet another WebUI for Nginx

github.com/0xJacky/nginx-ui

Nice dashboard hm.

2024-10-20

1569.

gokrazy Go appliances :: gokrazy

gokrazy.org

2024-09-27

1532.

nkanaev/yarr: yet another rss reader

github.com/nkanaev/yarr

yarr (yet another rss reader) is a web-based feed aggregator which can be used both
as a desktop application and a personal self-hosted server.

The app is a single binary with an embedded database (SQLite).

2024-09-20

1519.

Measure execution time in Go (Golang)

gosamples.dev/measure-time

A good snippet. I used it at work.

func track(name string) func() {
    start := time.Now()
    return func() {
        log.Printf("%s, execution time %s\n", name, time.Since(start))
    }
}

func main() {
    defer track("main")() // do not forget about the second parentheses
    time.Sleep(2 * time.Second)
}

2024-09-02

1487.

Mage :: Mage

magefile.org

Something like make, but magefiles are written in Go instead. Pretty funny.

1486.

go-shiori/obelisk: Go package and CLI tool for saving web page as single HTML file

github.com/go-shiori/obelisk
  • Embeds all resources (e.g. CSS, image, JavaScript, etc) producing a single HTML5 document that is easy to store and share.

  • In case the submitted URL is not HTML (for example a PDF page), Obelisk will still save it as it is.

  • Downloading each assets are done concurrently, which make the archival process for a web page is quite fast.

  • Accepts cookies, useful for pages that need login or article behind paywall.

Might actually be a good choice for Betula archival. Might need to fork it, though.

2024-08-27

1471.

charmbracelet/soft-serve

github.com/charmbracelet/soft-serve

The mighty, self-hostable Git server for the command line

2024-07-09

1366.

google/capslock

github.com/google/capslock

Capslock is a capability analysis CLI for Go packages that informs users of which privileged operations a given package can access. This works by classifying the capabilities of Go packages by following transitive calls to privileged standard library operations.

The recent increase in supply chain attacks targeting open source software has highlighted that third party dependencies should not be inherently trusted. Capabilities indicate what permissions a package has access to, and can be used in conjunction with other security signals to indicate which code requires additional scrutiny before it can be considered trusted.

2024-06-03

1284.

Staticcheck - The advanced Go linter

github.com/dominikh/go-tools

Staticcheck - The advanced Go linter. Contribute to dominikh/go-tools development by creating an account on GitHub.

2024-05-17

1258.

Anvil

zoom.rendermotion.ca/anvil

Anvil is a graphical, multi-pane tiling editor that makes bold use of the mouse and integrates closely with the shell. It supports syntax highlighting, multiple cursors and selections, remote file editing, and contains a powerful text manipulation language.

2024-04-20

1230.

Introduction | templ docs

templ.guide
package main

templ Hello(name string){
<div>Hello, { name }</div>
}

templ Greeting(person Person){
<div class="greeting">
@Hello(person.Name)
</div>
}

2024-04-07

1223.

Juev wiki

wiki.evsyukov.org

Вики на микоризе с ссылками про го.

2024-04-01

1213.

The Go Play Space

goplay.space

Alternative Go (Golang) Playground with syntax highlighting, turtle graphics and more

2024-03-21

1202.

Interning strings in Go

commaok.xyz/post/intern-strings

In Go, a string is a (possibly empty) immutable sequence of bytes. The critical word here for our purposes is immutable. Because byte slices are mutable, converting between string and []byte generally requires an alloc and copy, which is expensive.

What if such conversions were cached? That would make comparing strings so much faster!: two integer comparisons (len and ptr). This article explains how this approach could be implemented.

A library implementing this:

It looks pretty small and simple. Despite having only 81 stars, it is used by 67.4k GitHub packages. Transitive dependencies. Found it at work accidentally. OpenSource woes.

2024-03-09

1190.

Code repositories — oddmu.git

src.alexschroeder.ch/oddmu.git

2024-03-06

Reposted 1180.

Wrapping Errors in Go - How to Handle Nested Errors

blog.boot.dev/golang/wrapping-errors-in-go-how-to-handle-nested-errors

By wrapping errors and building well-formatted error messages, we can keep better track of where errors are happening. I often just add the name of the function being called to my error messages, but we can make the message say whatever we want. For example, I’ll often include parameter information in the error so I know which inputs caused the error.

2024-02-22

Reposted 1153.

Strategy pattern in Go

rednafi.com/go/strategy_pattern

2024-02-05

1106.

Safer Enums · npf.io

npf.io/2022/05/safer-enums

There’s no size difference between a string and a struct{ string } and it’s just as easy to read as a straight string. Because of the String() method, you can pass these values to %s etc in format strings and they’ll print out the name with no extra code or work.

2024-02-04

1104.

Better HTTP server routing in Go 1.22 - Eli Bendersky's website

eli.thegreenplace.net/2023/better-http-server-routing-in-go-122

The fish told me of this cool new feature. In short,

func main() {
  mux := http.NewServeMux()
  mux.HandleFunc("GET /path/", func(w http.ResponseWriter, r *http.Request) {
    fmt.Fprint(w, "got path\n")
  })

  mux.HandleFunc("/task/{id}/", func(w http.ResponseWriter, r *http.Request) {
    id := r.PathValue("id")
    fmt.Fprintf(w, "handling task with id=%v\n", id)
  })

  http.ListenAndServe("localhost:8090", mux)
}

Handy!

2024-01-10

1028.

koki-develop/clive

github.com/koki-develop/clive

⚡ Automates terminal operations.

2024-01-08

1024.

What We Got Right, What We Got Wrong

commandcenter.blogspot.com/2024/01/what-we-got-right-what-we-got-wrong.html

2023-12-16

980.

Go Developer Survey 2023 H2 Results - The Go Programming Language

go.dev/blog/survey2023-h2-results#sentiment

What we learned from our 2023 H2 developer survey

2023-11-20

Reposted 887.

Gripes With Go

peppe.rs/posts/gripes_with_go
886.

GitHub - dimkr/tootik: A federated nanoblogging service with a Gemini frontend.

github.com/dimkr/tootik

2023-11-16

867.

NilAway: Practical Nil Panic Detection for Go

www.uber.com/blog/nilaway-practical-nil-panic-detection-for-go

A linter for Go that finds nil panics. It found several potential nil panic in Betula and Mycorrhiza codebases that I didn't bother fixing.

2023-10-22

800.

Does Go Have Subtyping? – journal.stuffwithstuff.com

journal.stuffwithstuff.com/2023/10/19/does-go-have-subtyping

Via Waffle

2023-10-20

787.

banging errors in go

flak.tedunangst.com/post/bango

Tedu wrote a tool that lets you handle errors in Go like this:

func decomp(filename string) ([]byte, error) {
        fd := ^os.Open(filename)
        defer fd.Close()
        zd := ^gzip.NewReader(fd)
        data := ^io.ReadAll(zd)
        return data, nil
}

Funky!

2023-10-18

778.

Brooks, Wirth and Go. | Fredrik Holmqvist

www.fredrikholmqvist.com/posts/articles/brooks-wirth-go

Author says Go is good because it's stuck in the 70s. Also tells a bit how the 70s were like. Mentions IBM 360, Oberon and whatnot.

2023-09-24

635.

gokrazy is really cool

xeiaso.net/blog/gokrazy

2023-09-23

631.

Writing safe-to-use Go libraries

blog.orsinium.dev/posts/go/safe-api

The Go standard library is full of bad design choices from the perspective of safety of use.

2023-08-24

589.

Gio UI

gioui.org

Gio is an open source library for creating portable, immediate mode GUI programs for Android, iOS, Linux, Windows, macOS.

2023-08-23

578.

riyaz-ali/sqlean.go

github.com/riyaz-ali/sqlean.go

This module provides go bindings for sqlean. It is compatible with the popular mattn/go-sqlite3 driver.

2023-08-14

569.

Backward Compatibility, Go 1.21, and Go 2

go.dev/blog/compat

How Go is kept boring. And they canceled Go 2.

2023-08-05

540.

Bun: SQL client for Golang

bun.uptrace.dev

Lightweight Golang ORM for PostgreSQL, MySQL, MSSQL, and SQLite

2023-07-25

508.

humungus - miniwebproxy

humungus.tedunangst.com/r/miniwebproxy

Parses HTML responses and rewrites a simplified light weight version.

Rewrite rules are written in lua using standard CSS selectors.

507.

humungus - humungus

humungus.tedunangst.com/r/humungus

A Mercurial forge. Has a powerful vibe. Supports fo get.

2023-07-18

476.

research!rsc: Coroutines for Go

research.swtch.com/coro

Goroutines are not coroutines! I thought it was a nice pun! It's not!

Russ walks us over the concept of coroutines in other languages and then implements them in Go using goroutines.

Gotta read more thoroughly. I don't really see why we need them.

P. S. Loving how coroutine is shortened to coro. It's how the Francophones shorten laboratorie or whatever to just labo. Adolescent becomes ado. Cool French style!

2023-07-12

445.

Newsqueak: A Language for Communicating with Mice

swtch.com/~rsc/thread/newsqueak.pdf

1994. The language is nicely designed. Nice to see the original goroutines here, as this is a Go predecessor. The rodent theme is old, as it seems. The mice in the title are the computer mice.

444.

research!rsc: Storing Data in Control Flow

research.swtch.com/pcdata

Oh, that's how I should refactor Mycomarkup. Perfect.

2023-07-03

417.

Как установить расширение для SQLite

antonz.ru/install-sqlite-extension

Антон Жиянов рекламирует свой новый реестр. Там показано, как расширение в Го подключить, может пригодиться потом.

2023-06-19

375.

rrivera/identicon: Open source avatar generator inspired by GitHub avatars.

github.com/rrivera/identicon

Open source avatar generator inspired by GitHub avatars. - rrivera/identicon: Open source avatar generator inspired by GitHub avatars.

2023-06-14

343.

Rust Module System Encourages Poor Practices (Comparing to Go) [Dmitry Frank]

dmitryfrank.com/articles/rust_module_system_encourages_bad_practices

Go Go!

2023-06-12

326.

~mariusor

git.sr.ht/~mariusor

This person develops tools for the Fediverse in Go.

2023-06-07

300.

go-lemmy

gitea.elara.ws/Elara6331/go-lemmy

Go bindings to the Lemmy API, automatically generated directly from Lemmy's source code using the generator in cmd/gen.

2023-03-19

109.

Go is not an easy language

www.arp242.net/go-easy.html

Go is not an easy programming language. It is simple in many ways: the syntax is simple, most of the semantics are simple. But a language is more than just syntax; it’s about doing useful stuff. And doing useful stuff is not always easy in Go.

XahLee сказал:

the best languages to learn today for the next 20 year are: golang, PowerShell, Mathematica.

Про голянг понятно. Про остальное:

PowerShell or the pwsh, is far better shell than bash and unix bag friends.
Mathematica, is the programing language far beyond any other in the computing industry. A magnitude beyond all existing. It is more than a programing language, because it is really a computational knowledge base. Asides from math functions, such as solving equations or integration symbolically and hundreds other special math functions only a handful mathematician understands, it also embodies just about every practical algorithm in computer science. So, given a algorithm, you might write it in lang X for a hour or days, but Mathematica has it as part of the language, just call a function. Mathematica has few thousand functions builtin, not even needing to load a library.

🍄: Мне нравится, когда люди хорошо говорят о Мафематике. Мне она тоже нравится. Хочу как-нибудь лицензию получить... Говорят, с малиной π в комплекте идёт 🤔

108.

ksimka/go-is-not-good: A curated list of articles complaining that go (golang) isn't good enough

github.com/ksimka/go-is-not-good

A curated list of articles complaining that go (golang) isn't good enough

Not maintained since 2017. Nevertheless, the list is huge!

107.

How the Go runtime implements maps efficiently (without generics) | Dave Cheney

dave.cheney.net/2018/05/29/how-the-go-runtime-implements-maps-efficiently-without-generics

I get the impression that a map can only hold 64 values from this text, but this is not true. How does it work?

106.

Lies we tell ourselves to keep using Golang

fasterthanli.me/articles/lies-we-tell-ourselves-to-keep-using-golang

A wonderful read

105.

My Thoughts About Go - sulami's blog

blog.sulami.xyz/posts/my-thoughts-about-go

TL;DR* It feels boring, it feels old, and as a consequence overly laborious. As a general purpose language, I feel D does the job a lot better.

104.

Are you a Go black belt? — Bitfield Consulting

bitfieldconsulting.com/golang/black-belt

The author applies the belts from martial arts to Go knowledge. I have the green one.

103.

The Zen of Go | Dave Cheney

dave.cheney.net/2020/02/23/the-zen-of-go

The author applies the Zen of Python to Go and tells us how Go programs should be written. This is a well-written article.

102.

Любопытный, но довольно бесполезный пример полиморфизма в Go

t.me/teamerlin/6483
101.

Go is a great programming language

drewdevault.com/2021/04/02/Go-is-a-great-language.html

Perhaps the matter I most appreciate Go for is its long-term commitment to simplicity, stability, and robustness. I prize these traits more strongly than any other object of software design. The Go team works with an ethos of careful restraint, with each feature given deliberate consideration towards identifying the simplest and most complete solution, and they carefully constrain the scope of their implementations to closely fit those solutions. The areas where Go has failed in this regard are frightfully scarce.

100.

gopherdata/gophernotes: The Go kernel for Jupyter notebooks and nteract.

github.com/gopherdata/gophernotes

Gophernotes is a Go kernel for Jupyter notebooks and nteract. It lets you use Go interactively in a browser-based notebook or desktop app. Use gophernotes to create and share documents that contain live Go code, equations, visualizations and explanatory text. These notebooks, with the live Go code, can then be shared with others via email, Dropbox, GitHub and the Jupyter Notebook Viewer. Go forth and do data science, or anything else interesting, with Go notebooks!

99.

The right way to use go-sqlite3

web.archive.org/web/20210423132955/https://foxcpp.dev/articles/the-right-way-to-use-go-sqlite3

SQLite is a wonderful piece of software and it is completely meaningful to use it in a project written in Go even though SQLite itself is in C. Though people has been hitting lots of issues with it, mostly "database is locked" error that seems to appear out of nowhere.

First of all, SQLite allows concurrent readers but only a single writer. Unlike most places where you may encounter some sort of synchronization SQLite does not wait for the write lock to become available - instead it just returns an error, letting the caller deal with it. This is why you are getting "database is locked" errors.

98.

Ebitengine - A dead simple 2D game engine for Go

ebitengine.org

Ebiten (/ebíteɴ/) is an open source game library for the Go programming language. Ebiten's simple API allows you to quickly and easily develop 2D games that can be deployed across multiple platforms.

97.

Felix Rambles: Using Go despite misgivings

felix.plesoianu.ro/blog/using-go-despite-misgivings.html

And do I need to explain how bad it looks to have GitHub support baked right into your toolchain in 2020? We tried to warn you, folks.

96.

Statically compiling Go programs

www.arp242.net/static-go.html

Go creates static binaries by default unless you use cgo to call C code, in which case it will create a dynamically linked binary. Using cgo is more common than many people assume as the os/user and net packages use cgo, so importing either (directly or indirectly) will result in a dynamic binary.