aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Oaks <jacoboaks.8@gmail.com>2024-04-29 14:56:47 -0400
committerGitHub <noreply@github.com>2024-04-29 14:56:47 -0400
commite4ac19968dfec0b3e226395238bc7d74bae64544 (patch)
tree942480776e341fd4dcf5b0b6e8b5b4a1c8adf974
parent8d4e02ff7abd37664be94417c509bd13d42abd04 (diff)
parent5d9ac57635dbc05059aaa9e94b8c76a5da3ca5bb (diff)
downloadsally-e4ac19968dfec0b3e226395238bc7d74bae64544.tar.gz
Merge branch 'master' into dependabot/github_actions/fossas/fossa-action-1.3.3
Diffstat (limited to '')
-rw-r--r--.github/workflows/go.yml8
-rw-r--r--handler_test.go47
-rw-r--r--templates/404.html5
-rw-r--r--templates/index.html8
-rw-r--r--templates/package.html7
5 files changed, 72 insertions, 3 deletions
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index e8e084e..8679609 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -30,7 +30,9 @@ jobs:
run: make cover
- name: Upload coverage to codecov.io
- uses: codecov/codecov-action@v3
+ uses: codecov/codecov-action@v4
+ env:
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
lint:
name: Lint
@@ -45,11 +47,11 @@ jobs:
go-version: 1.21.x
cache: false # managed by golangci-lint
- - uses: golangci/golangci-lint-action@v3
+ - uses: golangci/golangci-lint-action@v5
name: Install golangci-lint
with:
version: latest
- args: --version # make lint will run the linter
+ args: --help # make lint will run the linter
- run: make lint
name: Lint
diff --git a/handler_test.go b/handler_test.go
index b8c667b..c88fe9d 100644
--- a/handler_test.go
+++ b/handler_test.go
@@ -62,6 +62,13 @@ func TestPackageShouldExist(t *testing.T) {
<head>
<meta name="go-import" content="go.uber.org/yarpc git https://github.com/yarpc/yarpc-go">
<meta http-equiv="refresh" content="0; url=https://pkg.go.dev/go.uber.org/yarpc">
+ <style>
+ @media (prefers-color-scheme: dark) {
+ body { background-color: #333; color: #ddd; }
+ a { color: #ddd; }
+ a:visited { color: #bbb; }
+ }
+ </style>
</head>
<body>
Nothing to see here. Please <a href="https://pkg.go.dev/go.uber.org/yarpc">move along</a>.
@@ -77,6 +84,11 @@ func TestNonExistentPackageShould404(t *testing.T) {
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css" />
+ <style>
+ @media (prefers-color-scheme: dark) {
+ body { background-color: #333; color: #ddd; }
+ }
+ </style>
</head>
<body>
<div class="container">
@@ -95,6 +107,13 @@ func TestTrailingSlash(t *testing.T) {
<head>
<meta name="go-import" content="go.uber.org/yarpc git https://github.com/yarpc/yarpc-go">
<meta http-equiv="refresh" content="0; url=https://pkg.go.dev/go.uber.org/yarpc/">
+ <style>
+ @media (prefers-color-scheme: dark) {
+ body { background-color: #333; color: #ddd; }
+ a { color: #ddd; }
+ a:visited { color: #bbb; }
+ }
+ </style>
</head>
<body>
Nothing to see here. Please <a href="https://pkg.go.dev/go.uber.org/yarpc/">move along</a>.
@@ -111,6 +130,13 @@ func TestDeepImports(t *testing.T) {
<head>
<meta name="go-import" content="go.uber.org/yarpc git https://github.com/yarpc/yarpc-go">
<meta http-equiv="refresh" content="0; url=https://pkg.go.dev/go.uber.org/yarpc/heeheehee">
+ <style>
+ @media (prefers-color-scheme: dark) {
+ body { background-color: #333; color: #ddd; }
+ a { color: #ddd; }
+ a:visited { color: #bbb; }
+ }
+ </style>
</head>
<body>
Nothing to see here. Please <a href="https://pkg.go.dev/go.uber.org/yarpc/heeheehee">move along</a>.
@@ -125,6 +151,13 @@ func TestDeepImports(t *testing.T) {
<head>
<meta name="go-import" content="go.uber.org/yarpc git https://github.com/yarpc/yarpc-go">
<meta http-equiv="refresh" content="0; url=https://pkg.go.dev/go.uber.org/yarpc/heehee/hawhaw">
+ <style>
+ @media (prefers-color-scheme: dark) {
+ body { background-color: #333; color: #ddd; }
+ a { color: #ddd; }
+ a:visited { color: #bbb; }
+ }
+ </style>
</head>
<body>
Nothing to see here. Please <a href="https://pkg.go.dev/go.uber.org/yarpc/heehee/hawhaw">move along</a>.
@@ -141,6 +174,13 @@ func TestPackageLevelURL(t *testing.T) {
<head>
<meta name="go-import" content="go.uberalt.org/zap git https://github.com/uber-go/zap">
<meta http-equiv="refresh" content="0; url=https://pkg.go.dev/go.uberalt.org/zap">
+ <style>
+ @media (prefers-color-scheme: dark) {
+ body { background-color: #333; color: #ddd; }
+ a { color: #ddd; }
+ a:visited { color: #bbb; }
+ }
+ </style>
</head>
<body>
Nothing to see here. Please <a href="https://pkg.go.dev/go.uberalt.org/zap">move along</a>.
@@ -312,6 +352,13 @@ func TestCustomTemplates(t *testing.T) {
<head>
<meta name="go-import" content="go.uberalt.org/zap git https://github.com/uber-go/zap">
<meta http-equiv="refresh" content="0; url=https://pkg.go.dev/go.uberalt.org/zap">
+ <style>
+ @media (prefers-color-scheme: dark) {
+ body { background-color: #333; color: #ddd; }
+ a { color: #ddd; }
+ a:visited { color: #bbb; }
+ }
+ </style>
</head>
<body>
Nothing to see here. Please <a href="https://pkg.go.dev/go.uberalt.org/zap">move along</a>.
diff --git a/templates/404.html b/templates/404.html
index ab5b34a..1915091 100644
--- a/templates/404.html
+++ b/templates/404.html
@@ -2,6 +2,11 @@
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css" />
+ <style>
+ @media (prefers-color-scheme: dark) {
+ body { background-color: #333; color: #ddd; }
+ }
+ </style>
</head>
<body>
<div class="container">
diff --git a/templates/index.html b/templates/index.html
index 8014921..53a41a2 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -16,6 +16,14 @@
.table-header { display: block; }
.inline-header { display: none; }
}
+
+ @media (prefers-color-scheme: dark) {
+ body { background-color: #333; color: #ddd; }
+ a { color: #ddd; }
+ a:visited { color: #bbb; }
+ .description { color: #bbb; }
+ .separator { border-color: #666; }
+ }
</style>
<body>
<div class="container">
diff --git a/templates/package.html b/templates/package.html
index 6183c51..281368a 100644
--- a/templates/package.html
+++ b/templates/package.html
@@ -3,6 +3,13 @@
<head>
<meta name="go-import" content="{{ .ModulePath }} {{ .VCS }} https://{{ .RepoURL }}">
<meta http-equiv="refresh" content="0; url={{ .DocURL }}">
+ <style>
+ @media (prefers-color-scheme: dark) {
+ body { background-color: #333; color: #ddd; }
+ a { color: #ddd; }
+ a:visited { color: #bbb; }
+ }
+ </style>
</head>
<body>
Nothing to see here. Please <a href="{{ .DocURL }}">move along</a>.