Skip to content

Commit c744e32

Browse files
committed
add docs for go-zap
1 parent 62a8d91 commit c744e32

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

src/components/platformIcon.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,7 @@ export const PLATFORM_TO_ICON = {
879879
'go-zerolog': 'go',
880880
'go-slog': 'go',
881881
'go-logrus': 'go',
882+
'go-zap': 'go',
882883
godot: 'godot',
883884
huggingface: 'huggingface',
884885
java: 'java',
@@ -1074,12 +1075,12 @@ export function PlatformIcon({
10741075

10751076
if (withLanguageIcon && languageIcon !== icon && languageIcon !== 'default') {
10761077
return (
1077-
<div {...otherProps} style={{position: 'relative', ...style}}>
1078+
<div {...otherProps} style={{ position: 'relative', ...style }}>
10781079
<Image
10791080
src={svg}
10801081
width={size}
10811082
height={size}
1082-
style={{borderRadius: `${radius}px`}}
1083+
style={{ borderRadius: `${radius}px` }}
10831084
alt={`${platform} icon`}
10841085
loading="eager"
10851086
/>
@@ -1111,7 +1112,7 @@ export function PlatformIcon({
11111112
{...otherProps}
11121113
placeholder={undefined}
11131114
loading="eager"
1114-
style={{borderRadius: `${radius}px`, marginTop: 0, marginBottom: 0, ...style}}
1115+
style={{ borderRadius: `${radius}px`, marginTop: 0, marginBottom: 0, ...style }}
11151116
alt={`${platform} icon`}
11161117
/>
11171118
);

src/middleware.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type {NextRequest} from 'next/server';
2-
import {NextResponse} from 'next/server';
1+
import type { NextRequest } from 'next/server';
2+
import { NextResponse } from 'next/server';
33

44
// This env var is set in next.config.js based on the `NEXT_PUBLIC_DEVELOPER_DOCS` env var at build time
55
// a workaround edge middleware not having access to env vars
@@ -27,7 +27,7 @@ const handleRedirects = (request: NextRequest) => {
2727

2828
const redirectTo = redirectMap.get(urlPath);
2929
if (redirectTo) {
30-
return NextResponse.redirect(new URL(redirectTo, request.url), {status: 301});
30+
return NextResponse.redirect(new URL(redirectTo, request.url), { status: 301 });
3131
}
3232

3333
// If we don't find an exact match, we try to look for a :guide placeholder
@@ -245,6 +245,10 @@ const USER_DOCS_REDIRECTS: Redirect[] = [
245245
from: '/platforms/go/logrus/',
246246
to: '/platforms/go/guides/logrus/',
247247
},
248+
{
249+
from: '/platforms/go/zap/',
250+
to: '/platforms/go/guides/zap/',
251+
},
248252
{
249253
from: '/clients/go/integrations/http/',
250254
to: '/platforms/go/guides/http/',

0 commit comments

Comments
 (0)