Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for bytes (0.18 sec)

  1. misc/go_android_exec/main.go

    	exitRe := regexp.MustCompile(exitReStr.String())
    
    	return &exitCodeFilter{w: w, exitRe: exitRe}, exitStr
    }
    
    func (f *exitCodeFilter) Write(data []byte) (int, error) {
    	n := len(data)
    	f.buf.Write(data)
    	// Flush to w until a potential match of exitRe
    	b := f.buf.Bytes()
    	match := f.exitRe.FindIndex(b)
    	if match == nil {
    		// Flush all of the buffer.
    		_, err := f.w.Write(b)
    		f.buf.Reset()
    		if err != nil {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Aug 21 17:46:57 GMT 2023
    - 15.3K bytes
    - Viewed (0)
  2. docs/debugging/pprofgoparser/main.go

    //
    // You should have received a copy of the GNU Affero General Public License
    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package main
    
    import (
    	"bufio"
    	"bytes"
    	"flag"
    	"fmt"
    	"log"
    	"math"
    	"os"
    	"path"
    	"regexp"
    	"strconv"
    	"strings"
    	"time"
    )
    
    var (
    	goroutinesRE, searchRE *regexp.Regexp
    
    	// User input flags
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Mar 06 11:43:16 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  3. docs/debugging/healing-bin/main.go

    					r, err := file.Open()
    					if err != nil {
    						return err
    					}
    
    					b, err := io.ReadAll(r)
    					if err != nil {
    						return err
    					}
    					buf := bytes.NewBuffer(nil)
    					if _, err = msgp.CopyToJSON(buf, bytes.NewReader(b)); err != nil {
    						return err
    					}
    
    					dec := json.NewDecoder(buf)
    					// Use number to preserve integers.
    					dec.UseNumber()
    					var htr map[string]interface{}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 3.2K bytes
    - Viewed (0)
  4. docs/debugging/hash-set/main.go

    	id := uuid.MustParse(deploymentID)
    
    	if file != "" {
    		distrib := make([][]string, setCount)
    		b, err := os.ReadFile(file)
    		if err != nil {
    			log.Fatalln(err)
    		}
    		b = bytes.ReplaceAll(b, []byte("\r"), []byte{})
    		sc := bufio.NewScanner(bytes.NewBuffer(b))
    		for sc.Scan() {
    			object = strings.TrimSpace(sc.Text())
    			set := sipHashMod(prefix+object, setCount, id)
    			distrib[set] = append(distrib[set], prefix+object)
    		}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 3.7K bytes
    - Viewed (0)
  5. docs/debugging/inspect/main.go

    		os.Exit(1)
    	}
    
    	// dump private key to file
    	privateKeyBytes := x509.MarshalPKCS1PrivateKey(privatekey)
    	privateKeyBlock := &pem.Block{
    		Type:  "RSA PRIVATE KEY",
    		Bytes: privateKeyBytes,
    	}
    	privatePem, err := os.Create("support_private.pem")
    	if err != nil {
    		fmt.Printf("error when create private.pem: %s n", err)
    		os.Exit(1)
    	}
    	err = pem.Encode(privatePem, privateKeyBlock)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 11 21:22:47 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  6. docs/debugging/s3-verify/main.go

    //
    // You should have received a copy of the GNU Affero General Public License
    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package main
    
    import (
    	"bytes"
    	"context"
    	"crypto/sha256"
    	"flag"
    	"fmt"
    	"hash"
    	"io"
    	"log"
    	"net/url"
    	"os"
    	"strings"
    	"sync"
    	"time"
    
    	"github.com/minio/minio-go/v7"
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Jun 22 15:12:47 GMT 2022
    - 8.4K bytes
    - Viewed (0)
  7. docs/debugging/xl-meta/main.go

    func checkXL2V1(buf []byte) (payload []byte, major, minor uint16, err error) {
    	if len(buf) <= 8 {
    		return payload, 0, 0, fmt.Errorf("xlMeta: no data")
    	}
    
    	if !bytes.Equal(buf[:4], xlHeader[:]) {
    		return payload, 0, 0, fmt.Errorf("xlMeta: unknown XLv2 header, expected %v, got %v", xlHeader[:4], buf[:4])
    	}
    
    	if bytes.Equal(buf[4:8], []byte("1   ")) {
    		// Set as 1,0.
    		major, minor = 1, 0
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Apr 24 17:56:22 GMT 2024
    - 20.2K bytes
    - Viewed (1)
  8. docs/debugging/s3-check-md5/main.go

    	debug                          bool
    	versions                       bool
    	insecure                       bool
    )
    
    // getMD5Sum returns MD5 sum of given data.
    func getMD5Sum(data []byte) []byte {
    	hash := md5.New()
    	hash.Write(data)
    	return hash.Sum(nil)
    }
    
    func main() {
    	flag.StringVar(&endpoint, "endpoint", "https://play.min.io", "S3 endpoint URL")
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Feb 17 01:15:57 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  9. docs/debugging/xattr/main.go

    	}
    
    	return binary.LittleEndian.Uint64(buf[:8]), nil
    }
    
    func listxattr(path string) ([]string, error) {
    	return xattr.LList(path)
    }
    
    func setxattr(path, name string, value uint64) error {
    	data := make([]byte, 8)
    	binary.LittleEndian.PutUint64(data, value)
    	return xattr.LSet(path, name, data)
    }
    
    func main() {
    	flag.StringVar(&path, "path", "", "path name where the attribute shall be applied")
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Dec 29 23:52:41 GMT 2023
    - 3.2K bytes
    - Viewed (0)
Back to top