![](/img/trans.png)
[英]how to get a line from string with a word in golang
我需要從 golang 中的多行字符串中獲取一行,它具有常用詞,如果啟用了該詞,那么我需要多行字符串中的一行,一旦啟用,我們將繼續。 . 該字符串是他們的服務器有問題。我必須繼續執行任務。希望服務器將為所有人啟用。一旦啟用,我們將繼續。 .我正在嘗試這個 golang 代碼 這是游樂場鏈接 ...
[英]how to get a line from string with a word in golang
我需要從 golang 中的多行字符串中獲取一行,它具有常用詞,如果啟用了該詞,那么我需要多行字符串中的一行,一旦啟用,我們將繼續。 . 該字符串是他們的服務器有問題。我必須繼續執行任務。希望服務器將為所有人啟用。一旦啟用,我們將繼續。 .我正在嘗試這個 golang 代碼 這是游樂場鏈接 ...
[英]Golang-migrate returns "no change"
我開始學習 Go 和 SQL。我嘗試在我的 go 項目中使用 golang-migrate 進行初始遷移。 數據庫是postgresql 這是遷移文件: 我使用的命令: migrate -path./schema -database 'postgres://postgres:root@localh ...
[英]Unable to save the data in two different table in golang using gorm
這是我的代碼我不確定出了什么問題用戶中的值正在用戶表中正確更新但地址結構值未將數據存儲在地址表中我想用一個結構關聯保存兩個用戶和地址表,請幫助我。 請幫幫我 ...
[英]Golang fiber c.Render layout not excute right template
我正在嘗試將一種布局與不同的模板一起使用, 在我的layout.html中,我有 在我的dashboard.html 在我的login.html 當我通過 controller 渲染儀表板時,它只加載 login.html,它總是取最后一個 html 文件 在主文件中,我告訴了在哪里可以找到視圖 ...
[英]How to connect supabase with my golang for jwt token verification API from supabase?
沒有任何關於此的專門視頻或文章。 我真的需要這個解決方案。 ...
[英]How to use mongocompact package in mongoclient connect options
目前我已經在 mongo 客戶端選項中使用了 NewRegistryBuilder( NewRegistryBuilder() ,我想以某種方式使用 mongocompact 中的NewRespectNilValuesRegistryBuilder NewRespectNilValuesRegis ...
[英]error: database driver: unknown driver postgresql (forgotten import?) - How to run golang migrate with make file
我正在嘗試使用 golang-migrate 在我的 go-fiber rest API 中運行遷移。 我在 makefile 中添加了用於運行遷移的命令。但是,當我運行make migrateup時,出現以下錯誤: 這是我正在使用的制作文件。 請任何人幫助我理解為什么這不起作用? ...
[英]How to get the digits of int value in Golang
我們如何在 Golang 中獲取num:= 658943的數字? 我需要將給定數字 ( num ) 中的每個數字值打印為 integer 而不是字符串。 ...
[英]Getting Error 'NoCredentialProviders: no valid providers in chain. Deprecated.' while calling acmpca.GetCertificate() in golang
我在調用 acmpca.GetCertificate() function 獲取證書時遇到錯誤, 我的 AWS_ACCESS_KEY_ID 和 AWS_SECRET_ACCESS_KEY 存儲在 ~/.aws/credentials 文件中,下面是代碼 誰能幫我解決這個問題? 提前致謝! ...
[英]Hyperledger Fabric: CreateChannel Issue version-2
織物織物樣品/測試網絡創建通道失敗 [1]: https://i.stack.imgur.com/tJLk3.png ...
[英]dynamic array dimension in golang
我正在嘗試在 Golang 中創建一個高維數組。 有誰知道該怎么做? 例如 dims := [3,2,1]作為參數 -> 想要high_dims_array := make([3][2][1]int, 0) dims := [2] -> 想要high_dims_array ...
[英]How can I populate a postgres table using docker-compose?
我試圖在運行docker-compose up -d時使用 csv 文件中的數據填充 postgres 表,但是,我嘗試過的所有方法最終都說找不到文件。 我嘗試的一種方法是使用golang-migrate和遷移來創建表工作,但是當嘗試運行COPY customers FROM 'customers ...
[英]Getting too many arguments in call to spdy.NewRoundTripperWithProxy error when i try to run my terratest go code for validating EKS cluster on AWS
當我嘗試運行我的 terratest go 代碼向/從 AWS EKS 部署、驗證和取消部署 k8s pod 時,調用 spdy.NewRoundTripperWithProxy 錯誤時獲取太多參數 我的腳本在 3 個月前運行良好,但看起來在這 3 個月之間在 k8s 方面發生了一些庫更改,這影響了 ...
[英]Getting error while fetching certificate from windows certificate store in Golang using `certtostore`?
我想使用 Windows 證書商店中的證書包,誰能告訴我我在這里做錯了什么? 我的代碼: 我得到的錯誤: ...
[英]Best way to handling MySQL 1045 Error in Golang
我有一個控制 MYSQL 錯誤 1045 的代碼, 但是錯誤就是這樣發生的 有這樣的代碼嗎? 有什么方法可以處理這個錯誤? ...
[英]Can you use golang-migrate with go's embed function?
我正在嘗試使用golang-migrate將 sql 文件遷移到我的 postgresql 數據庫中。 我可能做錯了,但是當我運行遷移命令時,它說沒有找到方案: 這是代碼: ...
[英]Is there a way to achieve postgres table partitioning using gorm v2?
在 gorm v2 https://gorm.io/docs/index.html中,有什么方法可以指定此表按某些列分區,如https://pg.uptrace.dev/table-partitioning/ ? ...
[英]holding old goose version while run test case in go lang
首先,我創建了一些遷移,它們的 goose 版本是 20220125506 之類的,但之后我添加了一些新的遷移文件,但我的 goose 版本在運行測試用例時並沒有每次都改變。 如何更改我的鵝版本? 有沒有希望請給我一個解決方案。 ...
[英]Is there no migration file at all in GORM?
如果我使用 GORM,沒有遷移文件?? 到目前為止,我用谷歌搜索並搜索了這些信息,根據我的理解,GORM 中沒有遷移文件,如果我想生成一個遷移文件,我必須使用 CLI。 GORM 沒有生成遷移文件的原因是“它不會刪除未使用的列來保護您的數據”。 ( https://gorm.io/docs/m ...
[英]Unable to install Beego framwork with GoLang on mac system
我是 Go Lang 的新手,我正在嘗試在我的 mac 系統上安裝 Beego 框架。 但是我不確定如何安裝beego和bee工具。 我提到了幾個網站,但無法找到/解決實際問題。 我正在使用以下版本的 GO。 go version go1.17.5 darwin/amd64 我正在嘗試從這個網站 ...