Help us shape the future of Go! Take the 2026 Go Developer Survey

appconfig

package
v2.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package appconfig ingests an application's own configuration files — Spring Boot's application*.yml / application*.properties and bootstrap*.yml — as Config nodes, one per flattened key (a context path, a service's module URL).

They are the same kind of node an .env key becomes (package compose), for the same reason: code names an address as ${key} (@FeignClient(url = "${some-service.module.url}"), CART_ADDR=${CART_ADDR}) and the value that key holds is where the call goes. With both in the graph, one expansion rule serves a Spring monorepo and a compose stack alike. Without them, a Spring service's clients were only names, and two clients of one URL under two names became two services.

Like compose and k8s, the YAML is line-scanned, not parsed: `url : http://…` with a space before the colon, ${…} placeholders and profile files that are half comments all stay readable, and one bad block costs its own keys only. Values go through compose.Redact before they are stored.

Index

Constants

View Source
const KindConfig = compose.KindConfig

KindConfig is the node kind, shared with .env keys.

Variables

This section is empty.

Functions

func IsConfigFile

func IsConfigFile(path string) bool

IsConfigFile reports whether a path is an application config file.

func IsTSConfig

func IsTSConfig(path string) bool

IsTSConfig reports whether a path is a TypeScript/JavaScript project config (tsconfig.json, tsconfig.*.json, jsconfig.json): where compilerOptions.paths maps an import alias (@/*) onto the directories it names.

func Parse

func Parse(path string, src []byte) parser.Result

Parse turns an application config file into Config nodes.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL