From cbd2bf4b6f135ec7765232a7d256cf3d0d7a6719 Mon Sep 17 00:00:00 2001 From: go-coverage-action Date: Fri, 17 May 2024 06:07:07 +0000 Subject: [PATCH] chore: add cover for 2ff5823d0756ac146c68570c03b8a028feaedb87 --- go-test-app-02/index.css | 2 +- go-test-app-02/index.js | 30 ++-- ...d0756ac146c68570c03b8a028feaedb87-inc.html | 108 ++++++++++++++ ...3d0756ac146c68570c03b8a028feaedb87-inc.out | 1 + ...3d0756ac146c68570c03b8a028feaedb87-inc.txt | 1 + ...5823d0756ac146c68570c03b8a028feaedb87.html | 137 ++++++++++++++++++ ...f5823d0756ac146c68570c03b8a028feaedb87.out | 11 ++ ...f5823d0756ac146c68570c03b8a028feaedb87.txt | 4 + 8 files changed, 284 insertions(+), 10 deletions(-) create mode 100644 go-test-app-02/revisions/2ff5823d0756ac146c68570c03b8a028feaedb87-inc.html create mode 100644 go-test-app-02/revisions/2ff5823d0756ac146c68570c03b8a028feaedb87-inc.out create mode 100644 go-test-app-02/revisions/2ff5823d0756ac146c68570c03b8a028feaedb87-inc.txt create mode 100644 go-test-app-02/revisions/2ff5823d0756ac146c68570c03b8a028feaedb87.html create mode 100644 go-test-app-02/revisions/2ff5823d0756ac146c68570c03b8a028feaedb87.out create mode 100644 go-test-app-02/revisions/2ff5823d0756ac146c68570c03b8a028feaedb87.txt diff --git a/go-test-app-02/index.css b/go-test-app-02/index.css index c3e27ff..881a209 100644 --- a/go-test-app-02/index.css +++ b/go-test-app-02/index.css @@ -39,7 +39,7 @@ html, body { body { background: var(--background) !important; overflow-y: scroll; - display: none; + opacity: 0; } #topbar { diff --git a/go-test-app-02/index.js b/go-test-app-02/index.js index f8d5ac0..950ad54 100644 --- a/go-test-app-02/index.js +++ b/go-test-app-02/index.js @@ -1,16 +1,27 @@ load([ - "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js", - "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/go.min.js", - "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css", - "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github.min.css", - "../index.css", + ["https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github.min.css"], + ["https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css", 'disabled'], + ["https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"], + ["https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/go.min.js"], + ["../index.css"], ]); document.addEventListener("DOMContentLoaded", main); +document.documentElement.style.setProperty("opacity", "0"); + function main () { document.querySelectorAll('style').forEach((el) => el.remove()); - document.body.style.setProperty("display", "block"); + + if (!window.hljs) { + console.log("Waiting for highlight.js to load..."); + setTimeout(main, 100); + return; + } + + document.documentElement.style.setProperty("opacity", "1"); + document.body.style.setProperty("transition", "all 0.1s ease-in-out"); + document.body.style.setProperty("opacity", "1"); document.querySelector("#legend").addEventListener("click", (event) => { let lightStyle = document.querySelector('link[href*="github.min.css"]'); @@ -105,19 +116,20 @@ function loadScript(src) { document.head.appendChild(script); } -function loadStyle(src) { +function loadStyle(src, disabled) { let style = document.createElement("link"); style.rel = "stylesheet"; style.href = src; + style.disabled = disabled === "disabled"; document.head.appendChild(style); } function load(urls) { - for (let url of urls) { + for (let [url, disabled] of urls) { if (url.endsWith(".js")) { loadScript(url); } else if (url.endsWith(".css")) { - loadStyle(url); + loadStyle(url, disabled); } } } diff --git a/go-test-app-02/revisions/2ff5823d0756ac146c68570c03b8a028feaedb87-inc.html b/go-test-app-02/revisions/2ff5823d0756ac146c68570c03b8a028feaedb87-inc.html new file mode 100644 index 0000000..8b26fd5 --- /dev/null +++ b/go-test-app-02/revisions/2ff5823d0756ac146c68570c03b8a028feaedb87-inc.html @@ -0,0 +1,108 @@ + + + + + + Go Coverage Report + + + +
+ +
+ not tracked + + no coverage + low coverage + * + * + * + * + * + * + * + * + high coverage + +
+
+
+ +
+ + + diff --git a/go-test-app-02/revisions/2ff5823d0756ac146c68570c03b8a028feaedb87-inc.out b/go-test-app-02/revisions/2ff5823d0756ac146c68570c03b8a028feaedb87-inc.out new file mode 100644 index 0000000..5f02b11 --- /dev/null +++ b/go-test-app-02/revisions/2ff5823d0756ac146c68570c03b8a028feaedb87-inc.out @@ -0,0 +1 @@ +mode: set diff --git a/go-test-app-02/revisions/2ff5823d0756ac146c68570c03b8a028feaedb87-inc.txt b/go-test-app-02/revisions/2ff5823d0756ac146c68570c03b8a028feaedb87-inc.txt new file mode 100644 index 0000000..004bfa1 --- /dev/null +++ b/go-test-app-02/revisions/2ff5823d0756ac146c68570c03b8a028feaedb87-inc.txt @@ -0,0 +1 @@ +total: (statements) 0.0% diff --git a/go-test-app-02/revisions/2ff5823d0756ac146c68570c03b8a028feaedb87.html b/go-test-app-02/revisions/2ff5823d0756ac146c68570c03b8a028feaedb87.html new file mode 100644 index 0000000..d185483 --- /dev/null +++ b/go-test-app-02/revisions/2ff5823d0756ac146c68570c03b8a028feaedb87.html @@ -0,0 +1,137 @@ + + + + + + cointoss: Go Coverage Report + + + +
+ +
+ not tracked + + not covered + covered + +
+
+
+ + + +
+ + + diff --git a/go-test-app-02/revisions/2ff5823d0756ac146c68570c03b8a028feaedb87.out b/go-test-app-02/revisions/2ff5823d0756ac146c68570c03b8a028feaedb87.out new file mode 100644 index 0000000..0a1ec91 --- /dev/null +++ b/go-test-app-02/revisions/2ff5823d0756ac146c68570c03b8a028feaedb87.out @@ -0,0 +1,11 @@ +mode: set +cointoss/main.go:10.13,11.27 1 1 +cointoss/main.go:11.27,13.3 1 1 +cointoss/main.go:13.8,15.3 1 0 +cointoss/main.go:17.2,17.32 1 1 +cointoss/main.go:20.24,21.23 1 1 +cointoss/main.go:21.23,23.3 1 1 +cointoss/main.go:23.8,25.3 1 0 +cointoss/main.go:28.19,29.21 1 1 +cointoss/main.go:29.21,31.3 1 1 +cointoss/main.go:31.8,33.3 1 0 diff --git a/go-test-app-02/revisions/2ff5823d0756ac146c68570c03b8a028feaedb87.txt b/go-test-app-02/revisions/2ff5823d0756ac146c68570c03b8a028feaedb87.txt new file mode 100644 index 0000000..7713fd1 --- /dev/null +++ b/go-test-app-02/revisions/2ff5823d0756ac146c68570c03b8a028feaedb87.txt @@ -0,0 +1,4 @@ +cointoss/main.go:10: main 75.0% +cointoss/main.go:20: tossCoin 66.7% +cointoss/main.go:28: maybe 66.7% +total: (statements) 70.0%