問題タブ [go-gin]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
go - 関数の型アサーションが必要
型アサーションと変換を学ぼうとしています。私にはちょっと複雑です。
私はこの例を持っています:(私はジンフレームワークを使用しています)
したがって、上記のコードでは.. db Env タイプを設定し、それをルーター関数に渡しています。そこから、別の関数を呼び出す必要があります。どうやってするか?
e._GetUserId(email) を呼び出すと、
この問題を解決する方法?. Env タイプの構造体の代わりに inferface{} を使用する必要がありますか?