From 93097b5ecfe104e656dc96d6399e83a15f0b7e29 Mon Sep 17 00:00:00 2001 From: lesheng Date: Wed, 19 Aug 2020 17:45:02 +0800 Subject: [PATCH] md --- PRINCIPLE.md | 0 SUMMARY.md | 16 ++++++++++++++++ golang/README.md | 20 ++++++++++++++++++++ golang/go-num-type.go | 0 golang/type-integers.md | 12 ++++++++++++ 5 files changed, 48 insertions(+) create mode 100644 PRINCIPLE.md create mode 100644 golang/README.md create mode 100644 golang/go-num-type.go create mode 100644 golang/type-integers.md diff --git a/PRINCIPLE.md b/PRINCIPLE.md new file mode 100644 index 0000000..e69de29 diff --git a/SUMMARY.md b/SUMMARY.md index 77cec6a..9047f53 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -1,5 +1,21 @@ # Summary +* [Golang](/golang/README.md) + * []() +* [Principle](/PRINCIPLE.md) + * [SRP-Single Responsibility Principle](/principle/srp.md) + * [OCP-Open Close Principle](/principle/ocp.md) + * [LSP-Liskov Substitution Principle](/principle/lsp.md) + * [ISP-Interface Segregation Principle](/principle/isp.md) + * [DIP-Dependence Inversion Principle](/principle/dip.md) + * [DRY-Don't Repeat Yourself](/principle/dry.md) + * [KIS-Keep it Simple Stupid](/principle/kis.md) + * [You "Ain't Gonna Need It](/principle/xxx.md) + * [Law Of Demeter](/principle/lod.md) + * [Composite/Aggregate Reuse Principle CARP](/principle/crp.md) + * [Refrence](/PRINCIPLE.md) + * [software-principles](https://code.tutsplus.com/tutorials/3-key-software-principles-you-must-understand--net-25161) + * [golang-example](https://golangbyexample.com/) * [Go Patterns](/README.md) * [Creational Patterns](/README.md#creational-patterns) * [Abstract Factory](/creational/abstract_factory.md) diff --git a/golang/README.md b/golang/README.md new file mode 100644 index 0000000..094007e --- /dev/null +++ b/golang/README.md @@ -0,0 +1,20 @@ +* [Byte](/goang/byte.md) + * [Word](#word) + * [BitSet](#bitset) +* [Basic Type](/golang/type-basic.md) + * [Integers](/golang/type-integers.md) + * [Floating-Point Numbers]() + * [Complex Numbers]() + * [Booleans]() + * [Strings]() + * [Constants]() +* [Aggregate Type](/golang/type-aggregate.md) + * [arry](/golang/type-aggregate-arry.md) + * [struct](/golang/type-aggregate-struct.md) +* [Reference Type](/golang/type-reference.md) + * [pointer](/golang/type-reference-pointer.md) + * [slice](/golang/type-reference-slice.md) + * [map](/golang/type-reference-map.md) + * [funcation](/golang/type-reference-funcation.md) + * [channel](/golang/type-reference-channel.md) +* [Interface Type](/golang) diff --git a/golang/go-num-type.go b/golang/go-num-type.go new file mode 100644 index 0000000..e69de29 diff --git a/golang/type-integers.md b/golang/type-integers.md new file mode 100644 index 0000000..2ade5cb --- /dev/null +++ b/golang/type-integers.md @@ -0,0 +1,12 @@ +# integer + +整数用8bit、16bit、32bit、64bit表示, +有符号整数分别对应int8、int16、int32、int64,用补码存储。 +无符号整数uint8、uint16、unint32、unint64,用原码存储。 +int、uint是使用最广泛的数值类型,是运算效率最高的数值。在编译时确定到底是多少位。 + +rune是int32类型的别名,表示一个Unicode(code point). +byte是uint8类型的别名,强调是原始的8位bit。 + +uintptr(u-int-ptr):无符号整数,大小不确定,长用于保存指针。在unsafe package中。 +