command
Version:
v0.6.13
Opens a new window with list of versions in this module.
Published: Feb 14, 2026
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Internationalization Example
Demonstrates multilingual error messages using Chinese (zh-Hans) and English locales.
What it does
- Shows validation errors in both Chinese and English
- Demonstrates the separation of validation and unmarshaling
- Shows production pattern with localized error handling
Run
go run main.go
Expected output
- Invalid data with validation errors in both languages
- Unmarshal still works despite validation failure
- Production pattern with successful validation and processing
Documentation
¶
Package main demonstrates i18n usage of the jsonschema library.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.