import "github.com/pingcap/tidb/util/format" // Example 1: Basic usage str := format.NewFormatter().Format("Hello, {0}!", "world") // "Hello, world!" // Example 2: Multiple arguments str = format.NewFormatter().Format("The {0} is {1}.", "answer", 42) // "The answer is 42." // Example 3: Named placeholders str = format.NewFormatter().Format("My name is {name}, and I am {age} years old.", format.NamedArgs{"name": "Alice", "age": 30}) // "My name is Alice, and I am 30 years old."In each example, we create a new `Formatter` object using `NewFormatter()`. We then call its `Format()` method, passing in a format string and any necessary arguments. The format string contains placeholders (e.g. `{0}`, `{1}`, `{name}`, etc.) which will be replaced with the corresponding arguments. The `NamedArgs` type is used to pass in arguments with named placeholders. This package is part of the TiDB database system's codebase, and is intended for use internally within TiDB. However, it could potentially be useful for any Go program that needs flexible formatting capabilities.