mirror of
https://github.com/LukeHagar/website.git
synced 2025-12-09 21:07:46 +00:00
docs: Add go runtime to platform dropdown for sdk api code samples
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import type { LanguageFn } from 'highlight.js';
|
||||
import hljs from 'highlight.js/lib/core';
|
||||
import go from 'highlight.js/lib/languages/go';
|
||||
import dart from 'highlight.js/lib/languages/dart';
|
||||
import javascript from 'highlight.js/lib/languages/javascript';
|
||||
import typescript from 'highlight.js/lib/languages/typescript';
|
||||
@@ -56,6 +57,7 @@ const languages = {
|
||||
text: plaintext,
|
||||
graphql: graphql,
|
||||
http: http,
|
||||
go: go,
|
||||
py: python,
|
||||
rb: ruby,
|
||||
cs: csharp,
|
||||
@@ -86,6 +88,7 @@ const platformAliases: Record<string, keyof typeof languages> = {
|
||||
[Platform.ServerKotlin]: 'kotlin',
|
||||
[Platform.ServerGraphql]: 'graphql',
|
||||
[Platform.ServerRest]: 'http',
|
||||
[Platform.ServerGo]: 'go',
|
||||
vue: 'html',
|
||||
svelte: 'html'
|
||||
};
|
||||
|
||||
@@ -43,7 +43,8 @@ export enum Platform {
|
||||
ServerJava = 'server-java',
|
||||
ServerDotNet = 'server-dotnet',
|
||||
ServerGraphql = 'server-graphql',
|
||||
ServerRest = 'server-rest'
|
||||
ServerRest = 'server-rest',
|
||||
ServerGo = 'server-go'
|
||||
}
|
||||
|
||||
export const platformMap: Record<Language | string, string> = {
|
||||
@@ -67,6 +68,7 @@ export const platformMap: Record<Language | string, string> = {
|
||||
[Platform.ServerJava]: 'Java',
|
||||
[Platform.ServerGraphql]: 'GraphQL',
|
||||
[Platform.ServerRest]: 'REST',
|
||||
[Platform.ServerGo]: 'Go',
|
||||
sh: 'Shell',
|
||||
js: 'JavaScript',
|
||||
ts: 'TypeScript',
|
||||
@@ -101,7 +103,8 @@ export const platformMap: Record<Language | string, string> = {
|
||||
text: 'Text',
|
||||
vue: 'Vue',
|
||||
svelte: 'Svelte',
|
||||
groovy: 'Groovy'
|
||||
groovy: 'Groovy',
|
||||
go: 'Go',
|
||||
};
|
||||
|
||||
export const serviceMap: Record<Service, string> = {
|
||||
|
||||
Reference in New Issue
Block a user