博客 / 列表

LiberHome - Golang 實現繼承

Golang的繼承可以通過結構體裏面包含匿名結構體實現,具體,比如iPhone這個結構體要繼承法phone這個結構體可以這樣寫: package main import "fmt" type phone struct { design_place string production_place string } type iphone struct { bra

繼承 , go

LiberHome - bug solved | This experimental syntax requires enabling xxx

另外,這倆問題是我在mobx中使用ES7裝飾器語法用到的,用普通的ES6語法是不會碰到這樣的問題,嫌麻煩也可以不用裝飾器語法,奈何我對這種看上去像Spring註釋的語法垂涎已久。 bug1 Experimental support for decorators is a feature that is subject to change in a future release. Set the

mobx

LiberHome - MySQL 數據類型詳解

數值類型 類型 內存空間大小 表示範圍 説明 tinyint 1byte 有符號 -128~ 127 無符號 0~255 特小型整數(可以存放人類的年齡) smallint 2byte(16bit) 有符號:-32768~32767 無符號 0~6553

數據類型 , MySQL

LiberHome - Golang file操作詳解

文件信息 可以用fileInfo這個API: package main import ( "fmt" "os" ) func main() { fileInfo, err := os.Stat("/Users/liberhome/GolandProjects/awesomeProject/test/test.txt") if err != nil {

file , go