Distribuindo uma aplicacao go sem o docker
1 points posted by faabiosr ⌘ Read more
Go 工具鏈詳解之升級版本不用愁的 go tool fix
go tool fix 作用go tool fix 是 Go 工具鏈中的一個命令,作用是把指定 Go 程序代碼包中的的所有舊版本代碼修正爲新版本的代碼(這裏所說的版本是 Golang 的版本)。升級 Go 版本之後,使用這個命令可以自動對程序進行必要的更改。Golang 的演進過程中,對一些函數和標準庫進行改進是難免的,改進過程中有可能會出現兼容問題,一旦出現了兼容問題,從舊版本升級到新版本的代價 ⌘ Read more
Gorm 中的遷移指南
在應用程序開發的不斷變化的景觀中,數據庫模式更改是不可避免的。GORM,強大的 Go 對象關係映射庫,通過遷移提供了一種無縫的解決方案來管理這些變化。本文將作爲您全面的指南,幫助您掌握使用 GORM 進行數據庫遷移和模式管理。我們將深入探討自動遷移、創建和應用遷移,以及在您的 Go 項目中優雅處理不斷髮展的模式需求的策略。GORM 中的自動遷移———–自動遷移是一個重要的改進,確保您 ⌘ Read more
go-mongox:簡單高效,讓文檔操作和 bson 數據構造更流暢
大家好,我是 陳明勇,一個熱愛技術,喜歡鑽研技術的程序員。前言在 Go 語言中使用 MongoDB 官方框架進行集合操作時,深深感到構建 bson 數據是一件非常繁瑣的工作。字段、逗號,括號等符號的排列,讓我感覺彷彿是在進行一場拼圖遊戲。因此我在想,有沒有一個能讓我絲滑,高效操作 MongoDB 的第三方框架呢,遺憾的是,並沒有找到符合我預期的框架,索性我就自己動手開發了一個,這就是 go-mon ⌘ Read more
Go 反射終極指南:從基礎到高級全方位解析
在本文中,我們將全面深入地探討 Go 語言的反射機制。從反射的基礎概念、爲什麼需要反射,到如何在 Go 中實現反射,以及在高級編程場景如泛型編程和插件架構中的應用,本文爲您提供一站式的學習指南。一、簡介反射是一種讓程序在運行時自省(introspect)和修改自身結構和行爲的機制。雖然這聽起來有點像 “自我觀察”,但實際上,反射在許多現代編程語言中都是一個非常強大和重要的工具。Go 語言也不例 ⌘ Read more
17 個開源的 Go 語言博客和 CMS 解決方案
Go 語言,也稱爲 Golang,是一種爲構建高效、可靠和可擴展軟件而設計的開源編程語言。它於 2007 年在 Google 開發,現在廣泛用於開發 Web 應用程序、網絡工具和系統軟件。爲什麼使用基於 Go 的 CMS 解決方案?———————-這些優勢使 Go 成爲開發可擴展、高性能應用程序的熱門選擇。在使用 Go 構建基於 Web 的解決方案時,其速度是其中一個主 ⌘ Read more
TCP 基礎詳解:Telnet 迴音服務器搭建
*概述Telnet 迴音服務器是一個簡單而實用的網絡應用,通過 Telnet 協議連接,用戶輸入什麼,服務器就回顯什麼。本文將介紹如何使用 Go 語言創建一個 Telnet 迴音服務器,通過完整的示例代碼和詳細註釋,便於理解 TCP 服務器的基本結構和實現。1. TCP 服務器基礎TCP 協議簡介package mainimport (“fmt”“net”)func main() { liste ⌘ Read more
無縫集成 GORM 與 Go Web 框架
探索 GORM 與流行的 Go Web 框架之間的和諧集成,以實現高效的數據管理—————————————-高效的數據管理是每個成功的 Web 應用程序的基礎。GORM,多才多藝的 Go 對象關係映射庫,與流行的 Go Web 框架非常搭配,提供了無縫集成,簡化了數據交互。本指南將帶您探索 GORM 與諸如 Gin、Echo 和 Beego 等 ⌘ Read more
Go 語言中的反射機制
在 Go 語言的衆多高級特性中,反射(Reflection)是一個強大且複雜的概念。它使得程序能夠在運行時檢查、修改其自身結構。反射在處理接口和類型斷言、開發通用功能或者設計框架時尤爲重要。本文將深入探索 Go 語言中的反射機制,通過具體的示例展示如何使用 reflect 包,讓你能夠在 Go 項目中有效地利用這一強大的工具。Go 反射基礎——-反射的概念反射是指計算機程序在運行時(run ⌘ Read more
使用 Go 語言創建自己的密碼加密工具
Go 語言藉助它的簡單性和強大的標準庫,實現一個自己的密碼加密工具非常簡單。在本篇文章中,我們將會結合代碼示例深入探討如何使用 Go 語言的 crypto 包來實現自己的加密工具。首先,我們需要 import 必要的包:package mainimport ( ”crypto/aes” ”crypto/cipher” ”crypto/rand” ”fmt” ”io”) ⌘ Read more
I will go for a walk to clear my head
Where is Humanity Going to Shid Now? Ep 1 ⌘ Read more
一篇文章帶你瞭解 Go 語言基礎之併發(channel)
前言–Hi,大家好,我是碼農,星期八,本篇繼續帶來 Go 語言併發基礎,channel 如何使用。看看 Go 協程如何配合 channel。快來上車叭。爲什麼需要 channel————-channel 在 Go 中,也叫做管道,是用來多線程之間共享數據的。通常情況下,在 Go 中共享數據用的也是channel,但是在 Go 有兩種共享數據方式。共享內存實現通訊。 通過管道 ⌘ Read more
Go 淺析主流日誌庫:從設計層學習如何集成日誌輪轉與切割功能
前言在現有的日誌庫中,包括 go 1.21.0 引入的 slog 日誌庫,它們通常都支持對日誌文件進行輪轉與切割,只不過這些功能並不直接被內置,而是需要我們主動配置來啓用。本文將探討幾個熱門的日誌庫如 logrus、zap 和官網的 slog,我將分析這些庫的的關鍵設計元素,探討它們是如何支持日誌輪轉與切割功能的配置。 淺析 logrus、zap 和 slog 的設計在對 logrus、zap 和 ⌘ Read more
一文搞懂 Go gRPC 服務 Handler 單元測試
在雲原生時代和微服務架構背景下,HTTP 和 RPC 協議成爲服務間通信和與客戶端交互的兩種主要方式。對於 Go 語言而言,標準庫提供了 net/http/httptest 包,爲開發人員提供了便捷的方式來構建服務端 HTTP Handler 單元測試的測試腳手架代碼,而無需真正建立 HTTP 服務器,讓開發人員可以聚焦於對 Handler 業務邏輯的測試。比如下面這個示例:// grpc-tes ⌘ Read more
Going for Codeberg to support a non-profit organisation that stands for the common good.
Go: select 實戰指南:協程切換技術
概述Go 語言的併發編程模型以其簡潔而強大的 goroutine 爲特色。而 select 語句則是在多個通信操作中選擇一個執行的關鍵工具。本文將討論如何使用 select 切換協程,通過清晰的示例代碼,幫助讀者掌握這一重要的併發編程技巧。select 語句的基本結構package mainimport ( “fmt” “time”)func main() { ch1 := make(chan s ⌘ Read more
Go 語言讀取 YAML 配置文件教程
在 Go 語言項目中,處理配置文件是一項常見的任務。YAML 是一種易讀易寫的配置文件格式,本教程將指導你如何在 Go 中讀取和解析 YAML 文件。我們將按照章節的形式逐步介紹相關的概念和示例代碼。第一章:引入依賴——–在開始之前,我們需要引入一個 YAML 解析的第三方庫。推薦使用 gopkg.in/yaml.v2。go get gopkg.in/yaml.v2第二章:創建 YAML ⌘ Read more
Go 打造高效的聊天系統
*概述構建一個高效的 Go 語言聊天服務器是一個具有挑戰性而又令人興奮的任務。本文將通過示例代碼和註釋,逐步實現一個功能強大的 Go 語言聊天服務器。通過清晰的項目結構和合理的邏輯劃分,將能夠理解服務器的設計和實現。1. 項目規劃與結構設計1.1 項目規劃在開始構建聊天服務器之前,需要進行項目規劃。明確通信協議、確定服務器功能和定義用戶管理方式是關鍵步驟。1.2 結構設計設計一個清晰的結構是確保項 ⌘ Read more
Go 語言 CSP 編程實戰:通道通信技術
*概述通信順序進程(Communicating Sequential Processes,CSP)是一種併發編程的形式化理論,由計算機科學家 Tony Hoare 於 1978 年提出。在 Go 語言中,CSP 被廣泛應用,通過通道(Channel)實現了簡單且強大的併發模型。本文將介紹 Go 語言中的 CSP 概念,通過詳細的示例代碼和註釋,理解 CSP 的運作原理和在 Go 中的實現。1. C ⌘ Read more
Go 排序算法探祕:打造通用 qsort 函數
*概述快速排序(QuickSort)是一種經典的排序算法,其高效性和廣泛應用使之成爲計算機科學領域的瑰寶。本文將介紹如何在 Go 語言中封裝快速排序函數,使其更易用、更具通用性,並通過示例和代碼解釋,讓讀者深入瞭解其原理和實現。1. 快速排序算法簡介1.1 算法原理快速排序是一種分治策略的排序算法,基本思想是通過選定一個基準元素。將序列分爲兩部分,小於基準的元素放在左邊,大於基準的元素放在右邊,然 ⌘ Read more
Go 語言項目命名規範(2023 年最新版)
在 Go 語言中,良好的命名規範是構建清晰、可讀和可維護代碼的關鍵。本指南旨在幫助你制定一致的命名規範,使你的 Go 項目更加整潔和易於理解。在實際項目開發中,每個項目組的成員開發習慣不一樣,可能會有自己的一些規範,所以這個規範僅供參考。第一章:包命名規範在 Go 中,包是代碼組織的基本單元。包名應該簡短而具有描述性。使用小寫字母: 包名應該使用小寫字母,不要使用下劃線或混合大小寫。 ⌘ Read more
@darch@neotxt.dk webmentions are dispatched from here https://git.mills.io/yarnsocial/yarn/src/branch/main/internal/post_handler.go#L160-L169
@prologic@twtxt.net its not.. There are going to be 1000s of copy cat apps built on AI. And they will all die out when the companies that have the AI platforms copy them. It happened all the time with windows and mac os. And iphone.. Like flashlight and sound recorder apps.
@prologic@twtxt.net the going theory is that openAI announced a new product that pretty much blew up the project of one of the board members. So that board member got 3 others to vote to fire Sam.
WebAssembly: using Go code in the browser
1 points posted by Elton Minetto ⌘ Read more
@Phys_org@feeds.twtxt.net We’re going to be killed by these people’s excesses, almost literally. This ratio is indefensible.
@movq@www.uninformativ.de I lasted for a long time.. Not sure where or when it was “got”. We had been having a cold go around with the kiddos for about a week when the wife started getting sicker than normal. Did a test and she was positive. We tested the rest of the fam and got nothing. Till about 2 days later and myself and the others were positive. It largely hasn’t been too bad a little feaver and stuffy noses.
But whatever it was that hit a few days ago was horrible. Like whatever switch in my head that goes to sleep mode was shut off. I would lay down and even though I felt sleepy, I couldn’t actually go to sleep. The anxiety hit soon after and I was just awake with no relief. And it persisted that way for three nights. I got some meds from the clinic that seemed to finally get me to sleep.
Now the morning after I realized for all that time a part of me was missing. I would close my eyes and it would just go dark. No imagination, no pictures, nothing. Normally I can visualize things as I read or think about stuff.. But for the last few days it was just nothing. The waking up to it was quite shocking.
Though its just the first night.. I guess I’ll have to see if it persists. 🤞
At $14 each, price is ‘no barrier’ for Aussie mangoes in the US
It takes two weeks for these Aussie mangoes to go from a farm to a US supermarket shelf. But for Manbulloo Mangoes it’s been worth it. ⌘ Read more
На сайте PEGI появилась возможная дата релиза Dragon‘s Dogma 2 — 22 марта 2024-го
Ранее в Capcom говорили, что выпустят крупную игру до конца текущего финансового года.
Pinellas County - 5 mile progression: 5.01 miles, 00:09:00 average pace, 00:45:10 duration
was hoping for a rain, mist, or whatever but alas it did not happen. comfy run and talked with several people in the park. exchanged pleasantries with the older gentleman i see all the time. had to run in the grass towards the end for some kids on bikes who never passed me. must have been going fast!
#running
Wondering how that person in Nebraska is doing keeping that cornerstone open-source package going.
Popular winemaker saved from closure by new investors and old hands
Cassegrain Wines on the NSW Mid North Coast is purchased by a syndicate of investors including the son of its former managing director, after going into voluntary administration earlier this year. ⌘ Read more
How to Turn Off iMessage on Mac
Some Mac users may wish to not receive messages, iMessages, and texts messages on their Mac, but by default if you have logged into iCloud on a Mac you will find that iMessage is also enabled, meaning you will get messages in MacOS. If you’re wondering how to stop messages from going to the Mac, … Read More ⌘ Read more
SPRF Half Marathon: 13.20 miles, 00:09:29 average pace, 02:05:12 duration
still host and humid (no surprise) but more cloud cover today. no kids but beth came and was able to cheer me on in a couple of places which was fun. the last bit she yelled “five to go!” which kind of got in my head a bit, albeit i think the heat started to get to me as well. had to take a couple of brief walks just to recollect and focus again. pretty good training run. keeping it in the green for the most part and around marathon pace. can’t wait to see how cooler weather and more training will pay off!
#running #race
How to Find Your Instagram Password & Username
Instagram is one of the most popular social networks in the world, where people post and share videos, reels, pictures, and so much more. You may occasionally come across a situation where you need to find your exact Instagram username, login information, or even Instagram password, and that’s what we’re going to help you out … Read More ⌘ Read more
Doctor’s Office
⌘ Read more
Doctor’s Office
⌘ Read more
jazigo 0.13.0 - Go tool for retrieving configuration for multiple network devices
Jazigo is a tool written in Go for retrieving configuration for multiple network devices, similar to rancid, fetchconfig, oxidized, Sweet.
Jazigo 0.13.0 adds support for setting ciphers for SSH transport.
1 point … ⌘ Read more
Pinellas County - Recovery: 3.13 miles, 00:12:31 average pace, 00:39:09 duration
i was suppose to do this yesterday but beth mentioned going out today so i just moved it.
#running
respmask: Go middleware for dynamically masking specific fields in JSON responses
1 points posted by timakin ⌘ Read more
How to Show Mac Games Only on Steam
Steam is a very popular gaming platform, but one frustrating thing about browsing Steam on a Mac can be when you find a game you might like, go to check it out, and then discover it’s for Windows only. Why’d you see a Windows only game in the Steam Store when you’re using Steam on … Read More ⌘ Read more
New in Go 1.21: Toolchains
1 points posted by Elton Minetto ⌘ Read more
This is some cool development for the go 1.22 standard http mux. Its adding the ability to have path vars and define methods for handlers. Also the errors are quite helpful if you have conflicting paths!
https://eli.thegreenplace.net/2023/better-http-server-routing-in-go-122/
Haiku OS - What’s going wrong and how to fix it
Listen now (31 mins) | Lunduke’s Big Tech Show - October 16th, 2023 ⌘ Read more
@bmallred@staystrong.run good thing i moved my run because no way i was going to be able to finish one after getting home around 0400. it was a fun night out with glenn and ash, but it may take a day or two to recover!
Pinellas County - Long Run: 11.14 miles, 00:10:15 average pace, 01:54:07 duration
did loops around the block since we had to leave early this morning. going to be a busy day (and night) so moved this run to today instead of tomorrow. pretty nice out, but it was beyond boring.
good thing i moved my run because no way i was going to be able to finish one after getting home around 0400. it was a fun night out with glen and ash, but it may take a day or two to recover!
#running
8 of the Best iPadOS 17 Features to Use Right Now
If you’ve already gone ahead and installed iPadOS 17 on your iPad, or are simply wondering about what is new, we’re going to take a look at the best iPadOS 17 features that you can use and appreciate right now on iPad. While there are many small changes scattered throughout iPadOS 17, some of the … Read More ⌘ Read more
Some iPhones Are Restarting or Turning Off Randomly at Night
Some iPhone users are discovering their iPhone has either randomly rebooted, or turned itself off, usually while plugged in overnight. Perhaps worst of all, when the iPhone starts back up, any set alarm may not go off, which has led some people to oversleep or to have to rely on a backup alarm. While not … Read More ⌘ Read more