Solana Login Flow
https://stillearly.io/article/how-to-login-to-supabase-with-solana/
https://stillearly.io/article/how-to-login-to-supabase-with-solana/
Backend Architecture Data Flow The backend provides data to the frontend via an API, with its primary responsibility being indexing blockchain data, such as transactions. To achieve this, the indexer continuously queries the Solana blockchain and stores the relevant data for efficient retrieval. Why Indexing? The Need for Indexing Raw blockchain data is not optimized for fast queries. Without indexing, fetching relevant information directly from the blockchain is inefficient because: ...
func main() { text, err := getPluralItemText(1) if err != nil { log.Println(err) } fmt.Println(text) text, err = getPluralItemText(10) if err != nil { log.Println(err) } fmt.Println(text) } func getPluralItemText(count int) (string, error) { msg := plural.Selectf(1, "%d", plural.One, "%[1]d item", plural.Other, "%[1]d items") key := "%d item" tag := "en" lTag := language.MustParse(tag) err := message.Set(lTag, key, msg) if err != nil { return "", err } p := message.NewPrinter(language.English) s := p.Sprintf("%d item", count) return s, nil } Result 1 item 10 items
Loose Coupling Anti-pattern: The Distributed Monolith Avoid splitting your application into microservices before you understand the boundaries. Tactic: Deploy loosely coupled modules. DRY introduces coupling Anti-pattern: Over-Coupling Through “Don’t Repeat Yourself” Adhering strictly to DRY can lead to strong coupling. Tactic: Being DRY in Go A Single Model Couples Your Application Anti-pattern: The Single Model In web applications, the views your API returns (read models) are not the same thing you store in the database (write models). ...
Tips for formatting time in Go
Tips for formatting time in Go