Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for translate (0.76 sec)

  1. tests/error_translator_test.go

    import (
    	"errors"
    	"testing"
    
    	"gorm.io/gorm"
    	"gorm.io/gorm/utils/tests"
    )
    
    func TestDialectorWithErrorTranslatorSupport(t *testing.T) {
    	// it shouldn't translate error when the TranslateError flag is false
    	translatedErr := errors.New("translated error")
    	untranslatedErr := errors.New("some random error")
    	db, _ := gorm.Open(tests.DummyDialector{TranslatedErr: translatedErr})
    
    	err := db.AddError(untranslatedErr)
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Jul 12 13:21:22 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  2. operator/cmd/mesh/operator-remove.go

    	"istio.io/istio/istioctl/pkg/cli"
    	iopv1alpha1 "istio.io/istio/operator/pkg/apis/istio/v1alpha1"
    	"istio.io/istio/operator/pkg/helmreconciler"
    	"istio.io/istio/operator/pkg/name"
    	"istio.io/istio/operator/pkg/translate"
    	"istio.io/istio/operator/pkg/util/clog"
    	"istio.io/istio/pkg/kube"
    )
    
    type operatorRemoveArgs struct {
    	// skipConfirmation determines whether the user is prompted for confirmation.
    Go
    - Registered: Wed Mar 20 22:53:08 GMT 2024
    - Last Modified: Fri Mar 15 01:18:49 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  3. misc/cgo/gmp/gmp.go

    find the definition of xxx.  If xxx is a type, cgo replaces C.xxx with
    a Go translation.  C arithmetic types translate to precisely-sized Go
    arithmetic types.  A C struct translates to a Go struct, field by
    field; unrepresentable fields are replaced with opaque byte arrays.  A
    C union translates into a struct containing the first union member and
    perhaps additional padding.  C arrays become Go arrays.  C pointers
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Apr 11 16:34:30 GMT 2022
    - 9.5K bytes
    - Viewed (0)
  4. interfaces.go

    type Rows interface {
    	Columns() ([]string, error)
    	ColumnTypes() ([]*sql.ColumnType, error)
    	Next() bool
    	Scan(dest ...interface{}) error
    	Err() error
    	Close() error
    }
    
    type ErrorTranslator interface {
    	Translate(err error) error
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Sat Aug 19 13:33:31 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  5. utils/tests/dummy_dialecter.go

    	return logger.ExplainSQL(sql, nil, `"`, vars...)
    }
    
    func (DummyDialector) DataTypeOf(*schema.Field) string {
    	return ""
    }
    
    func (d DummyDialector) Translate(err error) error {
    	return d.TranslatedErr
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Mar 06 06:03:31 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  6. src/cmd/addr2line/main.go

    	}
    
    	stdin := bufio.NewScanner(os.Stdin)
    	stdout := bufio.NewWriter(os.Stdout)
    
    	for stdin.Scan() {
    		p := stdin.Text()
    		if strings.Contains(p, ":") {
    			// Reverse translate file:line to pc.
    			// This was an extension in the old C version of 'go tool addr2line'
    			// and is probably not used by anyone, but recognize the syntax.
    			// We don't have an implementation.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Apr 11 16:34:30 GMT 2022
    - 2.3K bytes
    - Viewed (0)
  7. internal/s3select/sql/parser.go

    type LiteralString string
    
    // Capture interface used by participle
    func (ls *LiteralString) Capture(values []string) error {
    	// Remove enclosing single quote
    	n := len(values[0])
    	r := values[0][1 : n-1]
    	// Translate doubled quotes
    	*ls = LiteralString(strings.ReplaceAll(r, "''", "'"))
    	return nil
    }
    
    // LiteralList is a type for parsed SQL lists literals
    type LiteralList []string
    
    // Capture interface used by participle
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 12.9K bytes
    - Viewed (0)
  8. operator/cmd/mesh/install.go

    	"istio.io/istio/operator/pkg/cache"
    	"istio.io/istio/operator/pkg/helmreconciler"
    	"istio.io/istio/operator/pkg/manifest"
    	"istio.io/istio/operator/pkg/name"
    	"istio.io/istio/operator/pkg/translate"
    	"istio.io/istio/operator/pkg/util/clog"
    	"istio.io/istio/operator/pkg/util/progress"
    	"istio.io/istio/operator/pkg/verifier"
    	pkgversion "istio.io/istio/operator/pkg/version"
    	operatorVer "istio.io/istio/operator/version"
    Go
    - Registered: Wed Mar 20 22:53:08 GMT 2024
    - Last Modified: Fri Mar 15 01:18:49 GMT 2024
    - 15.2K bytes
    - Viewed (0)
  9. gorm.go

    }
    
    // AddError add error to db
    func (db *DB) AddError(err error) error {
    	if err != nil {
    		if db.Config.TranslateError {
    			if errTranslator, ok := db.Dialector.(ErrorTranslator); ok {
    				err = errTranslator.Translate(err)
    			}
    		}
    
    		if db.Error == nil {
    			db.Error = err
    		} else {
    			db.Error = fmt.Errorf("%v; %w", db.Error, err)
    		}
    	}
    	return db.Error
    }
    
    // DB returns `*sql.DB`
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Sun Aug 20 11:46:56 GMT 2023
    - 11.6K bytes
    - Viewed (0)
  10. operator/cmd/mesh/operator-init.go

    	"istio.io/api/operator/v1alpha1"
    	"istio.io/istio/istioctl/pkg/cli"
    	iopv1alpha1 "istio.io/istio/operator/pkg/apis/istio/v1alpha1"
    	"istio.io/istio/operator/pkg/name"
    	"istio.io/istio/operator/pkg/translate"
    	operatorutil "istio.io/istio/operator/pkg/util"
    	"istio.io/istio/operator/pkg/util/clog"
    	"istio.io/istio/pkg/config/constants"
    	"istio.io/istio/pkg/config/labels"
    	"istio.io/istio/pkg/kube"
    Go
    - Registered: Wed Mar 20 22:53:08 GMT 2024
    - Last Modified: Fri Mar 15 01:18:49 GMT 2024
    - 6.2K bytes
    - Viewed (0)
Back to top