這是一個建立於 的文章,其中的資訊可能已經有所發展或是發生改變。今天在用beego 做資料插入的時候遇到一個問題,我的配置都正確,但是資料始終無法插入,後來開啟log之後發現:must have one register DataBase alias named `default`意思是說,我必須要有一個別名被命名為:default的資料庫好,看My Code:orm.RegisterDataBase("postgresDB", "postgres", "
這是一個建立於 的文章,其中的資訊可能已經有所發展或是發生改變。【Go Methods and Interfaces】1、Go does not have classes. However, you can define methods on struct types. The method receiver appears in its own argument list between the func keyword and the method name. 2、You can
這是一個建立於 的文章,其中的資訊可能已經有所發展或是發生改變。【Go structs、slices、maps】1、定義時*在變數名後面,使用時*在變數名前面。 2、定義struct,type在前,struct關鍵字在後。 3、指標可以指定struct。 4、A struct literal denotes a newly allocated struct value by listing the values of its fields. You can list just a
這是一個建立於 的文章,其中的資訊可能已經有所發展或是發生改變。【Go Flow Control】1、for沒有(),必須有{}。 2、for的前後運算式可以為空白。 3、沒有while,for即是while。 4、無窮迴圈。 5、if沒有(),必須有{}。 6、if臨時變數。 Like for, the if statement can start with a short statement to execute before the
這是一個建立於 的文章,其中的資訊可能已經有所發展或是發生改變。閑著無聊又玩go語言找虐。。。——用go開發windows應用程式 想要用go開發windows應用必須先要安裝必要的組件: walk整合了很多windows的控制項 go get github.com/lxn/walk win是go調用windowsApi的一種實現 go get github.com/lxn/win rsrc是串連walk/win和windows動態串連的工具
標籤:【Go structs、slices、maps】1、定義時*在變數名後面,使用時*在變數名前面。 2、定義struct,type在前,struct關鍵字在後。 3、指標可以指定struct。 4、A struct literal denotes a newly allocated struct value by listing the values of its fields. You can list just a subset of fields by using the&