GO語言靜態代碼測試---應用于區塊鏈構建性測試

背景

隨著區塊鏈的這2年的快速發展,Go語言和針對GO語言測試工具也越來越完善,特別是Go語言的靜態代碼掃描工具完善,使GO語言和JAVA語言一樣可以靜態代碼自動掃描測試。說GO語言靜態代碼測試之前先說說靜態代碼測試。

靜態代碼測試

靜態代碼測試在不執行計算機程序的條件下,對源代碼進行分析,找出代碼缺陷。

  • 靜態代碼測試檢測類型:死鎖,空指針,資源泄露,緩沖區溢出,安全漏洞,競態條件。
  • 靜態代碼測試優點:
    1、能夠檢測所有的代碼級別的可執行路徑組合,快速,準確。
    2、直接面向源碼,分析多種問題
    3、在研發階段開始找到并修復多種問題,節省大量時間/人力成本
  • 靜態代碼測試缺點
    1、高誤報率:目前靜態分析產品的誤報率普遍在30%以上。
    2、缺陷種類較少,找到的問題級別不高:多數為代碼規范或低級缺陷,3、非實際Bug – 如命名規范、類定義規范,最佳實踐.....

GO語言靜態掃描測試工具

目前Go語言主流靜態代碼掃描測試工具主要是GoReporte和sonar集成的sonar-golang插件

GoReporte: 一個用于執行靜態分析,單元測試,代碼審查并生成代碼質量報告的Golang工具,這是一個運行一整套靜態代碼掃描測試流程工具類似于lint靜態掃描分析工具,并將其輸出標準化為報表的工具。

Sonar-golang:它在SonarQube儀表板中集成了GoMetaLinter報告。 用戶必須使用checkstyle格式為其代碼生成GoMetaLinter報告。 該報告因此使用Sonar-golang集成到SonarQube中。

SonarQube原理

從上圖中可以知道SonarQube可以做持續集成靜態代碼掃描分析也可以和IDE Integrotion工具集成實現程序員邊寫代碼邊進行靜態代碼分析,提高程序代碼質量。

sonar-golang集成GoMetaLinter工具介紹

GoMetaLinter此工具基本集成目前GO語言所有的檢測工具,然后可以并發的幫你靜態分析你的代碼。詳細情況看https://github.com/alecthomas/gometalinter常用功能介紹如下:

  • go vet -工具可以幫我們靜態分析我們的源碼存在的各種問題,例如多余的代碼,提前return的邏輯,struct的tag是否符合標準等。
  • go tool vet --shadow -用來檢查作用域里面設置的局部變量名和全局變量名設置一樣導致全局變量設置無效的問題
  • gotype -類型檢測用來檢測傳遞過來的變量和預期變量類型一致
  • gotype -x -在外部的測試包里進行語法和語義分析
  • deadcode -會告訴你哪些代碼片段根本沒用
  • gocyclo -用來檢查函數的復雜度
  • golint -是類似javascript中的jslint的工具,主要功能就是檢測代碼中不規范的地方變量名規范,變量的聲明,像var str string = “test”,會有警告,應該var str = “test”,大小寫問題,大寫導出包的要有注釋x += 1 應該 x++
  • varcheck -發現未使用的全局變量和常量
  • structcheck -發現未使用的 struct 字段
  • maligned - 那些struct 結構體的字段沒有排序,排好序的話,占的內存少
  • errcheck -檢查是否使用了錯誤返回值
  • megacheck - 這個寫代碼的時候idea 就提示了
  • gosimple -提供信息,幫助你了解哪些代碼可以簡化
  • Dupl-檢查是否有重復的代碼
  • ineffassign -檢測不使用變量
  • Interfacer -建議可以使用更細的接口。
  • unconvert -檢測冗余類型轉換
  • goconst -會查找重復的字符串,這些字符串可以抽取成常量。
  • gas - 用來掃描安全性問題 (Go的AST注入)
  • safesql -Golang靜態分析工具,防止SQL注入
    GoMetaLinter默認是沒有打開的功能有testify、test、gofmt -s、goimports 、gosimple 、lll、misspell 、nakedret 、unparam 、unused、safesql 、staticcheck要是打開下面功能需要用參數--enable=<linter>方式。

sonar-golang集成go test單元測試

在進行GO單元測試前,必須了解go語言單元測試規則和編譯方式方可進行單元測試,只有遵循這些單元規則才能把報告集成到sonar里面

規則

  • 文件名必須是_test.go結尾的,這樣在執行go test的時候才會執行到相應的代碼
  • 你必須import testing這個包
  • 所有的測試用例函數必須是Test開頭
  • 測試用例會按照源代碼中寫的順序依次執行
  • 測試函數TestXxx()的參數是testing.T,我們可以使用該類型來記錄錯誤或者是測試狀態
  • 測試格式:func TestXxx (t *testing.T),Xxx部分可以為任意的字母數字的組合,但是首字母不能是小寫字母[a-z],例如Testintdiv是錯誤的函數名。
  • 函數中通過調用testing.T的Error, Errorf, FailNow, Fatal, FatalIf方法,說明測試不通過,調用Log方法用來記錄測試的信息。

編譯方式

  • go test .編譯當前文件夾所有test測試用例(注意go test 后面的點)
  • go test -p 編譯這個包測試
  • go test -v 打印測試信息(默認不打印測試通過信息)
    如Test_test.go
    package gotest
    import (
    "testing"
    )
    func Test_Division_1(t *testing.T) {
    if i, e := Division(6, 2); i != 3 || e != nil { //try a unit test on function
    t.Error("除法函數測試沒通過") // 如果不是如預期的那么就報錯
    } else {
    t.Log("第一個測試通過了") //記錄一些你期望記錄的信息
    }
    }
    //func Test_Division_2(t *testing.T) {
    // t.Error("就是不通過")
    //}
    func Test_Division_2(t *testing.T) {
    if _, e := Division(6, 0); e == nil { //try a unit test on function
    t.Error("Division did not work as expected.") // 如果不是如預期的那
    么就報錯
    } else {
    t.Log("one test passed.", e) //記錄一些你期望記錄的信息
    }
    }

sonar-golang相關集成工具安裝和使用

Golang安裝

安裝步驟
1、wget [https://dl.google.com/go/go1.10.linux-amd64.tar.gz]
2、tar -xf go1.10.linux-amd64.tar.gz
3、mv go /usr/local/go1.10.linux-amd64
4、cd go/src
5、./all.bash
6、vim /etc/profile
export GOROOT=/usr/local/go
export GOBIN=GOROOT/bin export GOPATH=/home/mpsp/gowork export PATH=PATH:GOPATH:GOBIN:$GOPATH
source /etc/profile
go version

Sonarqube安裝

安裝要求
Java1.8+mysql5.6以上的版本+sonarqube(Checkstyle Chinese Pack PMD Web )+sonar-scanner
安裝步驟
1、yum install -y java-1.8.0
2、wget https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-5.6.zip
3、unzip sonarqube-7.0.zip
4、ln -s sonarqube-7.0 sonarqube
準備Sonar數據庫(sonar不支持MySQL5.5,所以如果看日志出現以上error 請安裝mysql5.6 或者更高版)
5、wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
6、 rpm -ivh mysql-community-release-el7-5.noarch.rpm
7、yum install mysql-community-server mariadb mariadb-server
8、systemctl start mysqld.service
9、mysql -uroot
mysql>update mysql.user set authentication_string=password('123456') where user='root';
mysql>flush privileges;
10、mysql -uroot -p123456
執行sql語句
mysql> CREATE DATABASE sonar CHARACTER SET utf8 COLLATE utf8_general_ci;
mysql> GRANT ALL ON sonar.* TO 'sonar'@'localhost' IDENTIFIED BY 'sonar@pw';
mysql> GRANT ALL ON sonar.* TO 'sonar'@'%' IDENTIFIED BY 'sonar@pw';
mysql> FLUSH PRIVILEGES;
11、修改/etc/my.cnf文件:
max_allowed_packet=128M
innodb_buffer_pool_size=512M
innodb_log_file_size=128M
innodb_log_buffer_size=1M
12、systemctl stop mysqld
13、systemctl start mysqld
配置Sonar
14、cd ~/sonarqube/conf/
15、vi sonar.properties
sonar.jdbc.username=sonar
sonar.jdbc.password=sonar@pw
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
sonar.web.host=0.0.0.0
sonar.web.port=9000
13、~/sonarqube/bin/linux-x86-64/sonar.sh start
14、http://ip:9000/admin/marketplace admin登入安裝插件 Checkstyle Chinese Pack PMD Web
15、打開sonarqube的控制臺,使用admin登錄后 ,在配置->SCM->菜單中,將Disabled the SCM Sensor設置為true否則使用會報錯

安裝go語言插件--sonar-golang

1、cd ~/sonarqube/extensions
2、wget https://github.com/uartois/sonar-golang/releases/download/v1.2.11/sonar-golang-plugin-1.2.11.jar
3、cd ~/sonarqube/bin/linux-x86-64&sonar.sh restart
以admin用戶登入編輯GO規則(目前版本只支持58條規則)
4、點擊Quality Profiles 頁面---點擊"Create" 按鈕---點擊Restore Built-In Profiles選擇language (Go)點擊保存

SonarQube Scanner(掃描器)安裝

1、wget https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-3.0.3.778-linux.zip
2、unzip sonar-scanner-cli-3.0.3.778-linux.zip
3、ln -s sonar-scanner-3.0.3.778-linux sonar-scanner
4、cd ~/sonar-scanner/conf
5、vi sonar-scanner.properties
sonar.host.url=http://localhost:9000
sonar.sourceEncoding=UTF-8
sonar.login=admin
sonar.password=admin
sonar.projectKey=uchains
sonar.projectName=uchains
sonar.projectVersion=1.0
sonar.golint.reportPath=report.xml
sonar.coverage.reportPath=coverage.xml
sonar.coverage.dtdVerification=false
sonar.test.reportPath=test.xml
sonar.sources=./
sonar.sources.inclusions=** /** .go
sonar.sources.exclusions=** /** _test.go,** /vendor/ * .com/ ** ,** /vendor/* .org/** ,** /vendor/**
sonar.tests=./
sonar.test.inclusions=** /** _test.go
sonar.test.exclusions=** /vendor/* .com/** ,** /vendor/* .org/** ,** /vendor/**
sonar.exclusions配置規則是? 匹配單個字符 ,** 匹配0個或多個文件夾 ,* 匹配0個或多個字符.
配置sonar-scanner環境變量
6、vi /etc/profile
PATH=$PATH:~/sonar-scanner/bin
export PATH
7、source .bashrc

GoMetaLinter 工具安裝

1、yum -y install git
2、go get -u gopkg.in/alecthomas/gometalinter.v1
3、gometalinter.v1 --install --update
4、gometalinter.v1 --install --debug
5、go get -u gopkg.in/alecthomas/gometalinter.v2
6、gometalinter.v2 --install --update
7、gometalinter.v2 --version

Coverage (since release 1.1) 安裝(用來檢測單元測試覆蓋率報告)

1、go get github.com/axw/gocov/...
2、go get github.com/AlekSi/gocov-xml
3、gocov (運行命令不報錯)

Tests (since release 1.1) 安裝(用來單元測試出報告)

1、go get -u github.com/jstemmer/go-junit-report
2、go test -v ./... | go-junit-report > test.xml

到此為止涉及到有GO語言靜態代碼掃描工具已經全部安裝完,只要運行相關命令不報錯,接下來進入你寫的GO工程目錄運行你寫的代碼就知道相關代碼質量

案例說明

上面既然說明工具已經安裝完,下面就簡單運行一個示例看看效果
1、準備示例代碼test.go
package gotest
import (
"errors"
)
func Division(a, b float64) (float64, error) {
if b == 0 {
return 0, errors.New("除數不能為0")
}
return a / b, nil
}
2、準備測試代碼Test_test.go
package gotest
import (
"testing"
)
func Test_Division_1(t *testing.T) {
if i, e := Division(6, 2); i != 3 || e != nil {
t.Error("除法函數測試沒通過") // 如果不是如預期的那么就報錯 //try a unit test on function
} else {
t.Log("第一個測試通過了") //記錄一些你期望記錄的信息
}}
//func Test_Division_2(t *testing.T) {
// t.Error("就是不通過")
//}
func Test_Division_2(t *testing.T) {
if _, e := Division(6, 0); e == nil { //try a unit test on function
t.Error("Division did not work as expected.") // 如果不是如預期的那
么就報錯
} else {
t.Log("one test passed.", e) //記錄一些你期望記錄的信息
}
}
3、在此工程目錄下運行下面命令
使用gometalinter進行代碼風格檢查和代碼質量檢測,命令如下:
gometalinter.v2 --checkstyle ./... > report.xml
gometalinter.v2 ./... > reportquality.xml
使用coverage進行單元測試覆蓋率檢查,要是go的1.9以下的版本必須用公go test ./... -coverprofile=...也可以用gocov test ./... | gocov-xml > coverage.xml 這樣的命令執行,命令如下:
go test -coverprofile=cover.out
gocov convert cover.out | gocov-xml > coverage.xml
go-junit-report工具生成單元測試報告執行下面命令:
go test -v ./... | go-junit-report > test.xml
SonarQube Scanner(掃描器)進行加載SonarQube相關規則和GO 語言插件定義的規則進行工程目錄下層層檢測,只要不錯檢測就成功了,要是檢測報錯可以看掃描器的日志和SonarQube日志執行命令如下
sonar-scanner
要是檢測目錄有多級目錄可以寫一個腳步自動執行,腳步如下:

#!/bin/bash
BASE=~/workgo/src/uchains
for D in `find . -type d‘
do
    if [[ $D == ./.git/* ]]; then
        continue
    elif [[  $D == .. ]]; then
        continue
    elif [[ $D == . ]]; then
        continue
    elif [[ $D == ./vendor/* ]]; then
        continue
    elif [[ $D == ./vendor ]]; then
        continue
    elif [[ $D == ./.svn/* ]]; then
        continue
    elif [[ $D == ./.svn ]]; then
        continue
    elif [[ $D == ./.idea ]]; then
        continue
    elif [[ $D == ./.idea/* ]]; then
        continue
    fi
    echo $D
    cd $D
    rm -rf coverage.xml test.xml report.xml cover.out reportquality.xml
    gometalinter.v2 ./... > reportquality.xml
    go test -coverprofile=cover.out
    gocov convert cover.out | gocov-xml > coverage.xml
    cd $BASE
done
    gometalinter.v2 --checkstyle ./... > report.xml
    gometalinter.v2 ./... > reportquality.xml
    go test -v ./... | go-junit-report > test.xml
    sonar-scanner

4、掃描成功后,下面就看看SonarQube 出來的報告


總述圖

從上面圖可以看到工程總體質量正常,單元測試覆蓋率100%,目前有3個輕微的BUG


BUG圖

從上圖可以看到目前工程存在的BUG
指標圖

根據圖上的指標維度去分析代碼質量


代碼質量描述.png

這張圖闡述代碼質量,特別適合代碼評審使用
gometalinter掃描結果圖

此圖是利用gometalinter.v2 ./... > reportquality.xml掃描出來的結果,這里可以分析出很問題,幫助程序員提高代碼能力。

IDE 的Intelij IDEA集成

安裝sonarLint、sonarQube community plugin
1、Settings->Plugins->Browse Repositories 搜索sonarLint、sonarQube community plugin點擊安裝。
2、配置關聯sonar服務
全局設置:Settings->Other Settings->SonarLint General Settings 添加sonar服務http://10.10.144.27:9000
項目設置:Settings->Other Settings->SonarLint Project Settings 選擇剛才配置的sonar服務,關聯到本項目
3、安裝分析的插件
go get -u gopkg.in/alecthomas/gometalinter.v2
gometalinter.v2 --install --update
go get github.com/axw/gocov
go get github.com/AlekSi/gocov-xml
go get -u github.com/jstemmer/go-junit-report
4、SonarQube Scanner的安裝和配置
https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/下載最新版本,解壓后配置環境變量
SONAR_SCANNER_HOME=Sonar Scanner根目錄
修改系統變量path,新增%SONAR_SCANNER_HOME%\bin(不新建SONAR_SCANNER_HOME直接新增path亦可)
打開cmd面板,輸入sonar-scanner -version,不出錯,則表示環境變量設置成功
sonar-scanner.properties配置
#----- Default source code encoding
sonar.sourceEncoding=UTF-8
sonar.login=admin
sonar.password=admin
#sonar.scm.disabled=true
#uchains
sonar.projectKey=uchains
sonar.projectName=uchains
sonar.projectVersion=1.0
sonar.golint.reportPath=report.xml
sonar.coverage.reportPath=coverage.xml
sonar.coverage.dtdVerification=false
sonar.test.reportPath=test.xml
sonar.showProfiling=true
sonar.log.level=DEBUG
#sonar.userHome={basedir}/.sonar sonar.verbose=true sonar.coverage.exclusions=vendor/** sonar.sources=./ sonar.sources.inclusions=** /** .go sonar.sources.exclusions=** /** _ test.go,** /vendor/* .com/ ** , ** /vendor/* .org/** ,** /vendor/** sonar.tests=./ sonar.test.inclusions=** /** _test.go sonar.test.exclusions=** /vendor/* .com/** ,** /vendor/* .org/** ,** /vendor/** 5、Intelij IDEA設置 Settings->Tools->ExternalTools如下圖 ![gometalinter.v2設置](https://upload-images.jianshu.io/upload_images/4852683-d78b6191aaf29865.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) ![sonar-scanner設置](https://upload-images.jianshu.io/upload_images/4852683-fc4470497176b0df.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 運行小程序 ![image.png](https://upload-images.jianshu.io/upload_images/4852683-3dfc8bef3f8a1074.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 將下面腳本寫個批處理放到ExternalTools中執行也可以手工執行 del coverage.xml test.xml report.xml cover.out reportquality.xml gometalinter.v2 ./... > reportquality.xml gometalinter.v2 --checkstyle ./... > report.xml go test -coverprofile=cover.out gocov convert cover.out | gocov-xml > coverage.xml go test -v ./... | go-junit-report > test.xml 安裝報錯信息如下:用下面方式解決 mkdir -pGOPATH/src/golang.org/x
cd $GOPATH/src/golang.org/x
git clone https://github.com/golang/net.git
git clone https://github.com/golang/tools.git
如何執行下面命令安裝
go get -v github.com/axw/gocov/...
錯誤信息如下:
D:\workspacego\testgo\src\uchains\api\bccsp>go get -v github.com/axw/gocov/...
Fetching https://golang.org/x/tools/cover?go-get=1
https fetch failed: Get https://golang.org/x/tools/cover?go-get=1: dial tcp 216.
239.37.1:443: connectex: A connection attempt failed because the connected party
did not properly respond after a period of time, or established connection fail
ed because connected host has failed to respond.
package golang.org/x/tools/cover: unrecognized import path "golang.org/x/tools/c
over" (https fetch: Get https://golang.org/x/tools/cover?go-get=1: dial tcp 216.
239.37.1:443: connectex: A connection attempt failed because the connected party
did not properly respond after a period of time, or established connection fail
ed because connected host has failed to respond.)
要想查看IDEA查看日志詳細信息
請在.idea目錄下的sonarlint.xml文件增加下面類容
<option name="verboseEnabled" value="true" />
<option name="analysisLogsEnabled" value="true" />

參考url:https://www.cnblogs.com/wintersun/p/5674903.html
https://github.com/gojp/goreportcard
https://github.com/360EntSecGroup-Skylar/goreporter 3.0版本
http://fiisio.me/pages/go_codereview_ana.html
https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner
https://github.com/alecthomas/gometalinter
https://blog.csdn.net/YID_152/article/details/53514036
http://www.lxweimin.com/p/711c1536f9f3
https://blog.csdn.net/u012500848/article/details/72963587
http://www.lxweimin.com/p/8f2a3020af94 Pipeline工具使用

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市,隨后出現的幾起案子,更是在濱河造成了極大的恐慌,老刑警劉巖,帶你破解...
    沈念sama閱讀 228,461評論 6 532
  • 序言:濱河連續發生了三起死亡事件,死亡現場離奇詭異,居然都是意外死亡,警方通過查閱死者的電腦和手機,發現死者居然都...
    沈念sama閱讀 98,538評論 3 417
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人,你說我怎么就攤上這事。” “怎么了?”我有些...
    開封第一講書人閱讀 176,423評論 0 375
  • 文/不壞的土叔 我叫張陵,是天一觀的道長。 經常有香客問我,道長,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 62,991評論 1 312
  • 正文 為了忘掉前任,我火速辦了婚禮,結果婚禮上,老公的妹妹穿的比我還像新娘。我一直安慰自己,他們只是感情好,可當我...
    茶點故事閱讀 71,761評論 6 410
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著,像睡著了一般。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發上,一...
    開封第一講書人閱讀 55,207評論 1 324
  • 那天,我揣著相機與錄音,去河邊找鬼。 笑死,一個胖子當著我的面吹牛,可吹牛的內容都是我干的。 我是一名探鬼主播,決...
    沈念sama閱讀 43,268評論 3 441
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了?” 一聲冷哼從身側響起,我...
    開封第一講書人閱讀 42,419評論 0 288
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后,有當地人在樹林里發現了一具尸體,經...
    沈念sama閱讀 48,959評論 1 335
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內容為張勛視角 年9月15日...
    茶點故事閱讀 40,782評論 3 354
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發現自己被綠了。 大學時的朋友給我發了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 42,983評論 1 369
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖,靈堂內的尸體忽然破棺而出,到底是詐尸還是另有隱情,我是刑警寧澤,帶...
    沈念sama閱讀 38,528評論 5 359
  • 正文 年R本政府宣布,位于F島的核電站,受9級特大地震影響,放射性物質發生泄漏。R本人自食惡果不足惜,卻給世界環境...
    茶點故事閱讀 44,222評論 3 347
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧,春花似錦、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 34,653評論 0 26
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至,卻和暖如春,著一層夾襖步出監牢的瞬間,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 35,901評論 1 286
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人。 一個月前我還...
    沈念sama閱讀 51,678評論 3 392
  • 正文 我出身青樓,卻偏偏與公主長得像,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當晚...
    茶點故事閱讀 47,978評論 2 374

推薦閱讀更多精彩內容