Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for indent (0.16 sec)

  1. internal/s3select/sql/parser_test.go

    	cases := []string{
    		// Key
    		"['name']", ".name", `."name"`,
    
    		// Index
    		"[2]", "[0]", "[100]",
    
    		// Object wildcard
    		".*",
    
    		// array wildcard
    		"[*]",
    	}
    	for i, tc := range cases {
    		err := p.ParseString(tc, &j)
    		if err != nil {
    			t.Fatalf("%d: %v", i, err)
    		}
    		// repr.Println(j, repr.Indent("  "), repr.OmitEmpty(true))
    	}
    }
    
    func TestJSONPath(t *testing.T) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  2. docs/iam/access-manager-plugin.go

    }
    
    func mainHandler(w http.ResponseWriter, r *http.Request) {
    	body, err := io.ReadAll(r.Body)
    	if err != nil {
    		writeErrorResponse(w, err)
    		return
    	}
    
    	var out bytes.Buffer
    	json.Indent(&out, body, "", "  ")
    	fmt.Printf("Received JSON payload:\n%s\n", out.String())
    
    	reqMap := make(map[string]interface{})
    	err = json.Unmarshal(body, &reqMap)
    	if err != nil {
    		writeErrorResponse(w, err)
    		return
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 08 17:15:20 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  3. docs/auditlog/auditlog-echo.go

    	if err != nil {
    		log.Printf("Error reading request body: %v", err)
    		w.WriteHeader(http.StatusBadRequest)
    		return
    	}
    
    	log.Printf(">>> %s %s\n", r.Method, r.URL.Path)
    	var out bytes.Buffer
    	json.Indent(&out, body, "", "    ")
    	log.Printf("%s\n", out.String())
    
    	w.WriteHeader(http.StatusOK)
    }
    
    func main() {
    	flag.Parse()
    	http.HandleFunc("/", mainHandler)
    
    	log.Printf("Listening on :%d\n", port)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 21:31:13 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  4. cmd/os-reliable.go

    			return errFileAccessDenied
    		}
    		return osErrToFileErr(err)
    	}
    
    	return nil
    }
    
    // Reliably retries os.MkdirAll if for some reason os.MkdirAll returns
    // syscall.ENOENT (parent does not exist).
    func reliableMkdirAll(dirPath string, mode os.FileMode, baseDir string) (err error) {
    	i := 0
    	for {
    		// Creates all the parent directories, with mode 0777 mkdir honors system umask.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Apr 22 17:49:30 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  5. src/cmd/asm/internal/asm/parse.go

    		}
    		num = int16(amount)
    	} else if p.peek() == '[' {
    		// parses an element: [Index]
    		p.get('[')
    		tok := p.get(scanner.Int)
    		index, err := strconv.ParseInt(tok.String(), 10, 16)
    		p.get(']')
    		if err != nil {
    			p.errorf("parsing element index: %s", err)
    		}
    		isIndex = true
    		isAmount = false
    		num = int16(index)
    	}
    
    	switch p.arch.Family {
    	case sys.ARM64:
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Feb 21 14:34:57 GMT 2024
    - 36.9K bytes
    - Viewed (0)
  6. cmd/object-api-multipart_test.go

    				}
    			}
    		})
    	}
    }
    
    // Benchmarks for ObjectLayer.PutObjectPart().
    // The intent is to benchmark PutObjectPart for various sizes ranging from few bytes to 100MB.
    // Also each of these Benchmarks are run both Erasure and FS backends.
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 77.1K bytes
    - Viewed (0)
  7. schema/index.go

    				})
    
    				indexes[index.Name] = idx
    			}
    		}
    	}
    	for _, index := range indexes {
    		if index.Class == "UNIQUE" && len(index.Fields) == 1 {
    			index.Fields[0].Field.UniqueIndex = index.Name
    		}
    	}
    	return indexes
    }
    
    func (schema *Schema) LookIndex(name string) *Index {
    	if schema != nil {
    		indexes := schema.ParseIndexes()
    		for _, index := range indexes {
    			if index.Name == name {
    				return &index
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sun Feb 04 07:49:19 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  8. schema/index_test.go

    	OID          int64  `gorm:"index:idx_id;index:idx_oid,unique"`
    	MemberNumber string `gorm:"index:idx_id,priority:1"`
    	Name7        string `gorm:"index:type"`
    	Name8        string `gorm:"index:,length:10;index:,collate:utf8"`
    
    	// Composite Index: Flattened structure.
    	Data0A string `gorm:"index:,composite:comp_id0"`
    	Data0B string `gorm:"index:,composite:comp_id0"`
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sun Feb 04 07:49:19 GMT 2024
    - 8K bytes
    - Viewed (0)
  9. internal/s3select/sql/parser.go

    type TableExpression struct {
    	Table *JSONPath `parser:"@@"`
    	As    string    `parser:"( \"AS\"? @Ident )?"`
    }
    
    // JSONPathElement represents a keypath component
    type JSONPathElement struct {
    	Key            *ObjectKey `parser:"  @@"`               // ['name'] and .name forms
    	Index          *int       `parser:"| \"[\" @Int \"]\""` // [3] form
    	ObjectWildcard bool       `parser:"| @\".*\""`          // .* form
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 12.9K bytes
    - Viewed (0)
  10. src/cmd/api/main_test.go

    				if strings.HasPrefix(c.Text, "// Deprecated:") {
    					return true
    				}
    			}
    		}
    		return false
    	}
    
    	w.deprecated = make(map[token.Pos]bool)
    	mark := func(id *ast.Ident) {
    		if id != nil {
    			w.deprecated[id.Pos()] = true
    		}
    	}
    	for _, file := range w.current.Files {
    		ast.Inspect(file, func(n ast.Node) bool {
    			switch n := n.(type) {
    			case *ast.File:
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Apr 09 20:48:51 GMT 2024
    - 31.4K bytes
    - Viewed (0)
Back to top