For errors with dynamic values, use fmt.Errorf:
name := "config.json"
err := fmt.Errorf("file not found: %s", name)
This works like fmt.Printf but returns an error. Include variable information to make errors actionable. "file not found: config.json" is more helpful than just "file not found".