GoLand Exact Theme
Publisher: sagaryadaviitkThemes in package: 1
A custom dark theme tuned to closely match the GoLand dark UI and Go syntax colors.
A custom dark theme tuned to closely match the GoLand dark UI and Go syntax colors.
Full workbench mockup using this variant's colors and tokenColors.
Loading...
Workbench UI color keys from the theme JSON colors map.
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| source, text | #bcbec4 | — |
| comment, punctuation.definition.comment | #7a7e85 | — |
| keyword, storage, storage.type, keyword.control, keyword.operator.word, keyword.other.package.go | #cf8e6d | — |
| entity.name.function, support.function, meta.function-call, variable.function, meta.function-call entity.name.function, meta.function-call support.function, meta.function-call variable.function | #bea663 | — |
| meta.function entity.name.function, meta.function.declaration entity.name.function, entity.name.function.definition, entity.name.function.go, meta.function.parameters entity.name.function | #5b9ede | — |
| entity.name.type, entity.name.class, support.type, support.class, storage.type.go, entity.name.type.module.go, support.class.go, entity.name.struct.go | #79b2c8 | — |
| string, string.quoted, string.template | #6aab73 | — |
| meta.import string.quoted, meta.import string.quoted.double, meta.import.go string.quoted, meta.import.go string.quoted.double | #6aab73 | — |
| constant.numeric, constant.language, constant.character.escape | #b5cea8 | — |
| entity.name.constant, entity.name.constant.go, variable.other.constant, variable.other.constant.go, support.constant, support.constant.go, meta.const.go entity.name.constant, meta.const.go entity.name.constant.go, meta.const.go variable.other.constant, meta.const.go variable.other.constant.go, meta.const.go support.constant, meta.const.go support.constant.go | #c189b7 | — |
| variable.parameter, variable, meta.definition.variable | #bcbec4 | — |
| variable.language, variable.language.this, variable.other.object, variable.other.readwrite, support.variable, variable.other.property, variable.object.property | #bcbec4 | — |
| variable.parameter, meta.parameter variable.parameter | #bcbec4 | — |
| meta.function.parameters.go variable.parameter, meta.function.arguments.go variable.parameter | #bcbec4 | — |
| entity.name.type.package.go, meta.package.go entity.name.package, meta.package.go entity.name.package.go, meta.package.go entity.name.type.package.go, meta.package.go support.type.package.go, meta.package.go entity.name.namespace, meta.package.go entity.name.module | #a7ac68 | — |
| entity.name.namespace, entity.name.module, support.type.package.go, meta.path.go, entity.name.package.go, variable.other.package.go, storage.modifier.import.go | #98ab74 | — |
| meta.method.receiver.go variable.parameter, meta.function.receiver.go variable.parameter, meta.receiver.go variable.parameter | #64a3df | — |
| meta.function-call object, meta.function-call variable.object | #bcbec4 | — |
| meta.function-call entity.name.namespace, meta.function-call entity.name.module, meta.function-call.go entity.name.namespace, meta.function-call.go entity.name.module, meta.function-call.method.go entity.name.namespace, meta.function-call.method.go entity.name.module, meta.function-call.go variable.other.package.go, meta.function-call.method.go variable.other.package.go | #98ab74 | — |
| meta.function-call.go, meta.function-call.method.go, meta.function-call support.function.go | #bea663 | — |
| meta.definition.function.go entity.name.function, meta.definition.method.go entity.name.function | #64a3df | — |
| meta.function-call.go variable.other.member, meta.function-call.go variable.other.property, meta.function-call.go support.variable, meta.function-call.go meta.property-access entity.name.function | #64a3df | — |
| entity.other.attribute-name, entity.name.label | #bcbec4 | — |
| punctuation, meta.brace, meta.delimiter | #bcbec4 | — |
export interface User {
id: string;
name: string;
role: "admin" | "member";
tags: string[];
}
/**
* Fetch user data by ID
* @param id
* @returns User object or null if ID is invalid
*/
export async function fetchUser(id: string): Promise<User | null> {
if (!id) {
return null;
}
const response = await fetch(`/api/users/${id}`, {
method: "GET",
headers: { Accept: "application/json" },
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}`);
}
return (await response.json()) as User;
}
function greet(user: User): string {
// Simple greeting function that uses the user's name
return `Hello, ${user.name}!`;
}