almanack
upspin
almanack | upspin | |
---|---|---|
11 | 20 | |
21 | 6,233 | |
- | 0.3% | |
9.0 | 6.0 | |
5 days ago | about 1 month ago | |
Go | Go | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
almanack
-
I think I'm going crazy refactoring my web app
You need to add the base template to the ParseFS call. The code here is more complicated than it needs to be. You don’t need to go through the FS yourself. The template parser can do that for you. Look at this example which doesn’t use a base template but could: https://github.com/spotlightpa/almanack/blob/master/layouts/layouts.go You would just change it to
-
Passing sql transactions when not needed
For me, GetBooks is a method on a query object and a query object has a DBTX interface struct field. So if I don’t need a transaction, I just use the normal DB as the DBTX but if I do, I call a method to open a TX first and use that. https://github.com/spotlightpa/almanack/blob/master/internal/db/db.go
- Is there a good example of an open source non-trivial (DB connection, authentication, authorization, data validation, tests, etc...) Go API?
-
ORM or no ORM (and which ones)?
Pagination is just an offset and a limit. There’s another package that handles the math for you: https://github.com/spotlightpa/almanack/blob/master/internal/paginate/paginate.go
- Help with lazy loading routes in Vue Router 3 with Vite
-
sqlc patterns in production
You can have methods on the SQLC structs. They just need to be in a separate file. See https://github.com/spotlightpa/almanack/blob/master/internal/db/page.go eg.
-
How are YOU using generics so far?
So far, just refactoring. I made a concurrency manager to simplify some stuff, and unified some pagination code. It’s like we said before generics: there are places you miss it, but not having it was never a total blocker. I think going working the x/slices x/maps packages will be the biggest time savers.
-
The HTML Data List Element
I ended up shipping this as a similar autocomplete field: https://github.com/spotlightpa/almanack/blob/master/src/comp...
It's a little different because I put the chosen selections on a row above the input row, but the principle is the same.
-
Testing a method which requires an API Key
https://github.com/spotlightpa/almanack/blob/master/internal/herokuapi/herokuapi_test.go#L14:L21
-
How to avoid duplicate code in gorilla/mux middleware
I’m using Chi not Gorilla, but you can see my JWT Auth middleware here: https://github.com/spotlightpa/almanack/blob/master/pkg/api/routes.go#L37
upspin
-
I Moved My Blog from IPFS to a Server
Super intriguing. Thanks for sharing!
It reminds me a bit of an early Go project called Upspin [1]. And also a bit of Solid [2]. Did you get any inspiration from them?
What excites me about your project is that you're addressing the elephant in the room when it comes to data sovereignty (~nobody wants to self-host a personal database but their personal devices aren't publicly accessible) in an elegant way.
By storing the data on my personal device and (presumably?) paying for a managed relay (and maybe an encrypted backup), I can keep my data in my physical possession, but I won't have to host anything on my own. Is that the idea?
https://upspin.io/
-
Educational Codebases
There are a few Go projects meant to be learned from:
- https://github.com/pion/opus for to learn audio
- https://github.com/benbjohnson/wtf for overall production quality
- https://github.com/upspin/upspin difficult to explain, personally I'm not a fan of the errors
-
Fundamentals to Learn
You could also take a look at some real-world open-source projects. I like upspin for its idiomatic approach.
- Examples of Good Go Repos
- Examples of an idiomatic API project
-
Best practices of validation on web apps?
For example, Rob Pike's upspin places all its validations in the separate package. Do you agree with that approach? Which yet proven options there are?
- Is there a good example of an open source non-trivial (DB connection, authentication, authorization, data validation, tests, etc...) Go API?
-
Ask HN: What Are You Working on This Year?
Just a few projects that could perhaps interest you in terms of design of your own solution :
Upspin: https://upspin.io/
- Upspin: A framework for naming everyone's everything.
-
proposal: Go 2: error handling: try statement with handler
The early error wrapping work which emerged out of the Upspin project, that eventually made its way into the errors package, included stack traces in the wrap error. This would provide exactly what it appears you seek.
What are some alternatives?
bun - SQL-first Golang ORM
ytcast - cast YouTube videos to your smart TV from command-line
tinykv - tiny in-memory single-app kv (cache) with explicit and sliding expiration
mitchellh/cli - A Go library for implementing command-line interfaces.
Listmonk - High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.
ivy - The Unified AI Framework
Grafana - The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
golang-gin-realworld-example-app - Exemplary real world application built with Golang + Gin
jet - Type safe SQL builder with code generation and automatic query result data mapping
fiber-boilerplate - This is the go boilerplate on the top of fiber web framework. With simple setup you can use many features out of the box
myapp - 🚀 How to build a Dockerized RESTful API application using Go.
Rundeck - Enable Self-Service Operations: Give specific users access to your existing tools, services, and scripts