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