Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for Exec (0.2 sec)

  1. cni/pkg/util/executil.go

    package util
    
    import (
    	"bytes"
    	"errors"
    	"os/exec"
    	"strings"
    
    	"istio.io/istio/pkg/log"
    )
    
    type ExecList struct {
    	Cmd  string
    	Args []string
    }
    
    func NewExec(cmd string, args []string) *ExecList {
    	return &ExecList{
    		Cmd:  cmd,
    		Args: args,
    	}
    }
    
    func ExecuteOutput(cmd string, args ...string) (string, error) {
    	externalCommand := exec.Command(cmd, args...)
    	stdout := &bytes.Buffer{}
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  2. migrator/migrator.go

    	if option.CheckOption != "" {
    		sql.WriteString(" ")
    		sql.WriteString(option.CheckOption)
    	}
    	return m.DB.Exec(m.Explain(sql.String(), m.DB.Statement.Vars...)).Error
    }
    
    // DropView drop view
    func (m Migrator) DropView(name string) error {
    	return m.DB.Exec("DROP VIEW IF EXISTS ?", clause.Table{Name: name}).Error
    }
    
    // GuessConstraintAndTable guess statement's constraint and it's table based on name
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  3. internal/event/target/postgresql.go

    		if eventData.EventName == event.ObjectRemovedDelete {
    			_, err = target.deleteStmt.Exec(key)
    		} else {
    			var data []byte
    			if data, err = json.Marshal(struct{ Records []event.Event }{[]event.Event{eventData}}); err != nil {
    				return err
    			}
    
    			_, err = target.updateStmt.Exec(key, data)
    		}
    		return err
    	}
    
    	if target.args.Format == event.AccessFormat {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 17:51:07 GMT 2024
    - 13.3K bytes
    - Viewed (0)
  4. istioctl/pkg/dashboard/dashboard.go

    	if !browser {
    		fmt.Fprint(writer, "skipping opening a browser")
    		return
    	}
    
    	switch runtime.GOOS {
    	case "linux":
    		err = exec.Command("xdg-open", url).Start()
    	case "windows":
    		err = exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start()
    	case "darwin":
    		err = exec.Command("open", url).Start()
    	default:
    		fmt.Fprintf(writer, "Unsupported platform %q; open %s in your browser.\n", runtime.GOOS, url)
    	}
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Mon Apr 15 01:29:35 GMT 2024
    - 20.5K bytes
    - Viewed (0)
  5. cmd/service.go

    	// the file it points to has been changed we will use the updated symlink.
    	argv0, err := exec.LookPath(os.Args[0])
    	if err != nil {
    		return err
    	}
    
    	// Invokes the execve system call.
    	// Re-uses the same pid. This preserves the pid over multiple server-respawns.
    	return syscall.Exec(argv0, os.Args, os.Environ())
    }
    
    // freezeServices will freeze all incoming S3 API calls.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Feb 28 07:02:14 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  6. cmd/object_api_suite_test.go

    		t.Errorf("%s: Expected the error message to be `%s`, but instead found `%s`", instanceType, "Bucket exists: string", err.Error())
    	}
    }
    
    func enableCompression(t *testing.T, encrypt bool) {
    	// Enable compression and exec...
    	globalCompressConfigMu.Lock()
    	globalCompressConfig.Enabled = true
    	globalCompressConfig.MimeTypes = nil
    	globalCompressConfig.Extensions = nil
    	globalCompressConfig.AllowEncrypted = encrypt
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 32.3K bytes
    - Viewed (0)
  7. finisher_api.go

    		// restore prepared statement
    		if isPreparedStmtTx {
    			db.Statement.ConnPool = preparedStmtTx
    		}
    	} else {
    		db.AddError(ErrUnsupportedDriver)
    	}
    	return db
    }
    
    // Exec executes raw sql
    func (db *DB) Exec(sql string, values ...interface{}) (tx *DB) {
    	tx = db.getInstance()
    	tx.Statement.SQL = strings.Builder{}
    
    	if strings.Contains(sql, "@") {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 22.7K bytes
    - Viewed (0)
  8. tests/sql_builder_test.go

    		t.Errorf("Raw with Rows should find one record with name 3")
    	}
    
    	DB.Exec("update users set name=? where name in (?)", "jinzhu-raw", []string{user1.Name, user2.Name, user3.Name})
    	if DB.Where("name in (?)", []string{user1.Name, user2.Name, user3.Name}).First(&User{}).Error != gorm.ErrRecordNotFound {
    		t.Error("Raw sql to update records")
    	}
    
    	DB.Exec("update users set age=? where name = ?", gorm.Expr("age * ? + ?", 2, 10), "jinzhu-raw")
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 16.7K bytes
    - Viewed (0)
  9. tests/tests_test.go

    			dbDSN = tidbDSN
    		}
    		db, err = gorm.Open(mysql.Open(dbDSN), cfg)
    	default:
    		log.Println("testing sqlite3...")
    		db, err = gorm.Open(sqlite.Open(filepath.Join(os.TempDir(), "gorm.db")), cfg)
    		if err == nil {
    			db.Exec("PRAGMA foreign_keys = ON")
    		}
    	}
    
    	if err != nil {
    		return
    	}
    
    	if debug := os.Getenv("DEBUG"); debug == "true" {
    		db.Logger = db.Logger.LogMode(logger.Info)
    	} else if debug == "false" {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Dec 15 08:36:08 GMT 2023
    - 3.3K bytes
    - Viewed (1)
  10. tests/migrate_test.go

    	}
    
    	var err error
    	err = DB.Migrator().DropTable(&MissPKUser{}, &MissPKLanguage{})
    	if err != nil {
    		t.Fatalf("DropTable err:%v", err)
    	}
    
    	DB.Exec(`CREATE EXTENSION IF NOT EXISTS "uuid-ossp";`)
    
    	err = DB.AutoMigrate(&MissPKUser{}, &MissPKLanguage{})
    	if err != nil {
    		t.Fatalf("AutoMigrate err:%v", err)
    	}
    
    	// patch
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 11:24:16 GMT 2024
    - 56.2K bytes
    - Viewed (0)
Back to top