use errors.New to replace fmt.Errorf

use errors.New to replace fmt.Errorf to get detailed error information,because errors.New is faster than fmt.Errorf.