go-admingo-admin
  • Guide
  • Development
    • Advanced
    • Commands
  • Advanced
  • Help
  • GitHub
  • Changelog
⌘ K
The app Command
The config Command
The migrate Command
The server Command
The version Command
The install Command
Last updated:
Open-source MIT Licensed | Copyright © 2020-present
Powered by go-admin-team

TABLE OF CONTENTS

‌
‌
‌
‌

Viewing the Config

The config command reads the config file and prints the values it actually parsed, which is the fastest way to confirm whether a setting is taking effect as expected.

sh
$ ./go-admin config -c config/settings.yml

Without -c, it reads config/settings.yml by default.

Output

The command prints five config blocks as JSON, in order:

BlockContents
applicationRun mode, listen address and port, read/write timeouts, the data-permission switch
jwtSigning secret and token lifetime
databaseDatabase driver and connection string; per-tenant configs under multi-tenancy
genThe code generator's database name and frontend path
loggerLog path, level, and switches

Sample output:

json
application: {
"ReadTimeout": 1,
"WriterTimeout": 2,
"Host": "0.0.0.0",
"Port": 8000,
"Name": "testApp",
"Mode": "dev",
"EnableDP": false
}

WARNING

The output contains sensitive information. The jwt block includes the signing secret, and the database block's connection string includes the database username and password — both printed in plain text.

When troubleshooting, do not paste the command's full output directly into an issue, a chat group, or anywhere public. If you need to share it, strip the secret and password first.

When to Use It

This command mainly answers "is this setting actually taking effect":

  1. Confirm which file was loaded — multi-environment configs are easy to mix up; the printed values reflect exactly what was actually loaded;
  2. Confirm whether a field is being parsed at all — a field written in the config file but absent from the output means the current version doesn't read it. The locker block, for example, has no corresponding struct field;
  3. Confirm the run mode — before going live, check that Mode is prod, to avoid deploying with dev still set (which skips captcha verification on login and issues tokens that essentially never expire).

Note that the command only prints these five blocks — cache, queue, ssl, and others aren't included in its output. See Config Reference for the complete field documentation.

WARNING

Where to get help:

If anything in this guide is unclear, please open an issue.