VSCODE에서 command + shift + p
아래 추천검색어를 클릭
토글 형태이다. UI를 노출 시킬지 말지를 결정할 수 있다.
vscode setting 파일에
{
"go.coverOnSingleTest": true,
"go.coverageDecorator": {
"type": "gutter",
"coveredHighlightColor": "rgba(64,128,128,0.5)",
"uncoveredHighlightColor": "rgba(128,64,64,0.25)",
"coveredGutterStyle": "blockgreen",
"uncoveredGutterStyle": "blockred"
}
}
저장 후 테스트를 돌려보면 아래와 같이 사진이 나옵니당.
참조 : https://dev.to/vuong/golang-in-vscode-show-code-coverage-of-after-saving-test-8g0