Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 434 for Stringer (0.12 sec)

  1. staging/src/k8s.io/apimachinery/pkg/util/dump/dump_test.go

    import (
    	"fmt"
    	"testing"
    )
    
    func ptrint(i int) *int {
    	return &i
    }
    
    func ptrstr(s string) *string {
    	return &s
    }
    
    // custom type to test Stringer interface on non-pointer receiver.
    type customString string
    
    // String implements the Stringer interface for testing invocation
    func (s customString) String() string {
    	return "custom string " + string(s)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 27 01:24:22 UTC 2023
    - 10.3K bytes
    - Viewed (0)
  2. pkg/registry/rbac/validation/rule.go

    	// If visitor() returns false, visiting is short-circuited.
    	VisitRulesFor(user user.Info, namespace string, visitor func(source fmt.Stringer, rule *rbacv1.PolicyRule, err error) bool)
    }
    
    // ConfirmNoEscalation determines if the roles for a given user in a given namespace encompass the provided role.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Nov 02 16:51:16 UTC 2020
    - 11.6K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/abt/avlint32_test.go

    		return
    	}
    
    }
    
    func tree(x []int32) *T {
    	t := &T{}
    	for _, d := range x {
    		t.Insert(d, stringer(fmt.Sprintf("%v", d)))
    	}
    	return t
    }
    
    func treePlus1(x []int32) *T {
    	t := &T{}
    	for _, d := range x {
    		t.Insert(d, stringer(fmt.Sprintf("%v", d+1)))
    	}
    	return t
    }
    func TestApplicInsert(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 11 16:34:41 UTC 2022
    - 20.3K bytes
    - Viewed (0)
  4. src/fmt/print.go

    type Formatter interface {
    	Format(f State, verb rune)
    }
    
    // Stringer is implemented by any value that has a String method,
    // which defines the “native” format for that value.
    // The String method is used to print values passed as an operand
    // to any format that accepts a string or to an unformatted printer
    // such as [Print].
    type Stringer interface {
    	String() string
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:22:43 UTC 2024
    - 31.8K bytes
    - Viewed (0)
  5. cmd/apierrorcode_string.go

    // Code generated by "stringer -type=APIErrorCode -trimprefix=Err api-errors.go"; DO NOT EDIT.
    
    package cmd
    
    import "strconv"
    
    func _() {
    	// An "invalid array index" compiler error signifies that the constant values have changed.
    	// Re-run the stringer command to generate them again.
    	var x [1]struct{}
    	_ = x[ErrNone-0]
    	_ = x[ErrAccessDenied-1]
    	_ = x[ErrBadDigest-2]
    	_ = x[ErrEntityTooSmall-3]
    	_ = x[ErrEntityTooLarge-4]
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jun 13 22:26:38 UTC 2024
    - 21.4K bytes
    - Viewed (0)
  6. src/io/multi_test.go

    		t.Errorf(`expected "foo bar"; got %q`, result)
    	}
    }
    
    func TestMultiWriter(t *testing.T) {
    	sink := new(bytes.Buffer)
    	// Hide bytes.Buffer's WriteString method:
    	testMultiWriter(t, struct {
    		Writer
    		fmt.Stringer
    	}{sink, sink})
    }
    
    func TestMultiWriter_String(t *testing.T) {
    	testMultiWriter(t, new(bytes.Buffer))
    }
    
    // Test that a multiWriter.WriteString calls results in at most 1 allocation,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 06 15:49:32 UTC 2022
    - 10K bytes
    - Viewed (0)
  7. src/debug/dwarf/const.go

    // Copyright 2009 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Constants
    
    package dwarf
    
    //go:generate stringer -type Attr -trimprefix=Attr
    
    // An Attr identifies the attribute type in a DWARF [Entry.Field].
    type Attr uint32
    
    const (
    	AttrSibling        Attr = 0x01
    	AttrLocation       Attr = 0x02
    	AttrName           Attr = 0x03
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:33:30 UTC 2023
    - 13.8K bytes
    - Viewed (0)
  8. Makefile

    	@echo "Installing msgp" && go install -v github.com/tinylib/msgp@v1.1.10-0.20240227114326-6d6f813fff1b
    	@echo "Installing stringer" && go install -v golang.org/x/tools/cmd/stringer@latest
    
    crosscompile: ## cross compile minio
    	@(env bash $(PWD)/buildscripts/cross-compile.sh)
    
    verifiers: lint check-gen
    
    check-gen: ## check for updated autogenerated files
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 17:41:02 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  9. src/cmd/vet/testdata/print/print.go

    	fmt.Printf("%x", nil)                       // ERROR "Printf format %x has arg nil of wrong type untyped nil"
    	fmt.Printf("%s", stringerv)                 // ERROR "Printf format %s has arg stringerv of wrong type .*print.ptrStringer"
    	fmt.Printf("%t", stringerv)                 // ERROR "Printf format %t has arg stringerv of wrong type .*print.ptrStringer"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 09 01:28:01 UTC 2023
    - 27.5K bytes
    - Viewed (0)
  10. src/go/printer/testdata/expressions.golden

    	_ = struct{ s struct{ int } }{struct{ int }{0}}
    
    	_ = (interface{})(nil)
    	_ = (interface{ String() string })(nil)
    	_ = (interface {
    		String() string
    	})(nil)
    	_ = (interface{ fmt.Stringer })(nil)
    	_ = (interface {
    		fmt.Stringer
    	})(nil)
    }
    
    func _() {
    	// do not modify literals
    	_ = "tab1	tab2	tab3	end"	// string contains 3 tabs
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 03 16:41:54 UTC 2017
    - 12.4K bytes
    - Viewed (0)
Back to top