Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for Tabwidth (0.12 sec)

  1. src/text/tabwriter/tabwriter.go

    		// padding is done with tabs
    		if b.tabwidth == 0 {
    			return // tabs have no width - can't do any padding
    		}
    		// make cellw the smallest multiple of b.tabwidth
    		cellw = (cellw + b.tabwidth - 1) / b.tabwidth * b.tabwidth
    		n := cellw - textw // amount of padding
    		if n < 0 {
    			panic("internal error")
    		}
    		b.writeN(tabs, (n+b.tabwidth-1)/b.tabwidth)
    		return
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 16:46:34 UTC 2024
    - 17.8K bytes
    - Viewed (0)
  2. src/go/printer/printer_test.go

    	// filter exports if necessary
    	if mode&export != 0 {
    		ast.FileExports(f) // ignore result
    		f.Comments = nil   // don't print comments that are not in AST
    	}
    
    	// determine printer configuration
    	cfg := Config{Tabwidth: tabwidth}
    	if mode&rawFormat != 0 {
    		cfg.Mode |= RawFormat
    	}
    	if mode&normNumber != 0 {
    		cfg.Mode |= normalizeNumbers
    	}
    
    	// print AST
    	var buf bytes.Buffer
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  3. src/text/tabwriter/tabwriter_test.go

    	}
    }
    
    func check(t *testing.T, testname string, minwidth, tabwidth, padding int, padchar byte, flags uint, src, expected string) {
    	var b buffer
    	b.init(1000)
    
    	var w Writer
    	w.Init(&b, minwidth, tabwidth, padding, padchar, flags)
    
    	// write all at once
    	title := testname + " (written all at once)"
    	b.clear()
    	write(t, title, &w, src)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 16:46:34 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  4. src/cmd/gofmt/gofmt.go

    		}
    	}
    
    	ast.SortImports(fileSet, file)
    
    	if *simplifyAST {
    		simplify(file)
    	}
    
    	res, err := format(fileSet, file, sourceAdj, indentAdj, src, printer.Config{Mode: printerMode, Tabwidth: tabWidth})
    	if err != nil {
    		return err
    	}
    
    	if !bytes.Equal(src, res) {
    		// formatting has changed
    		if *list {
    			fmt.Fprintln(r, filename)
    		}
    		if *write {
    			if info == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 15.1K bytes
    - Viewed (0)
  5. src/cmd/cgo/out.go

    	"internal/xcoff"
    	"io"
    	"os"
    	"os/exec"
    	"path/filepath"
    	"regexp"
    	"sort"
    	"strings"
    	"unicode"
    )
    
    var (
    	conf         = printer.Config{Mode: printer.SourcePos, Tabwidth: 8}
    	noSourceConf = printer.Config{Tabwidth: 8}
    )
    
    // writeDefs creates output files to be compiled by gc and gcc.
    func (p *Package) writeDefs() {
    	var fgo2, fc io.Writer
    	f := creat(*objDir + "_cgo_gotypes.go")
    	defer f.Close()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 16:41:10 UTC 2024
    - 59.6K bytes
    - Viewed (0)
  6. internal/bpool/bpool.go

    func NewBytePoolCap(maxSize uint64, width int, capwidth int) (bp *BytePoolCap) {
    	if capwidth > 0 && capwidth < 64 {
    		panic("buffer capped with smaller than 64 bytes is not supported")
    	}
    	if capwidth > 0 && width > capwidth {
    		panic("buffer length cannot be > capacity of the buffer")
    	}
    	return &BytePoolCap{
    		c:    make(chan []byte, maxSize),
    		w:    width,
    		wcap: capwidth,
    	}
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Apr 19 16:44:59 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  7. internal/bpool/bpool_test.go

    	size := uint64(4)
    	width := 1024
    	capWidth := 2048
    
    	bufPool := NewBytePoolCap(size, width, capWidth)
    
    	// Check the width
    	if bufPool.Width() != width {
    		t.Fatalf("bytepool width invalid: got %v want %v", bufPool.Width(), width)
    	}
    
    	// Check with width cap
    	if bufPool.WidthCap() != capWidth {
    		t.Fatalf("bytepool capWidth invalid: got %v want %v", bufPool.WidthCap(), capWidth)
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Jan 30 19:13:27 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/fess/helper/DocumentHelper.java

            if (content == null) {
                return StringUtil.EMPTY; // empty
            }
    
            String subContent;
            if (content.length() < maxWidth * 2) {
                subContent = content;
            } else {
                subContent = content.substring(0, maxWidth * 2);
            }
    
            final int[] spaceChars = getSpaceChars();
    Registered: Wed Jun 12 13:08:18 UTC 2024
    - Last Modified: Thu Feb 22 01:37:57 UTC 2024
    - 12K bytes
    - Viewed (0)
  9. operator/pkg/util/progress/progress.go

    		// If we aren't a terminal, no need to spam extra lines
    		prefix = `{{ yellow "-" }} `
    	}
    	// reduce by 2 to allow for the "- " that will be added below
    	maxWidth -= 2
    	if maxWidth > 0 && len(msg) > maxWidth {
    		return prefix + msg[:maxWidth-3] + "..."
    	}
    	// cycle will alternate between "-" and " ". "-" is given multiple times to avoid quick flashing back and forth
    	return prefix + msg
    }
    
    // For testing only
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 14 19:23:44 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types/size.go

    				t.SetNotInHeap(true)
    			}
    		}
    
    		offset += f.Type.width
    
    		maxwidth := MaxWidth
    		// On 32-bit systems, reflect tables impose an additional constraint
    		// that each field start offset must fit in 31 bits.
    		if maxwidth < 1<<32 {
    			maxwidth = 1<<31 - 1
    		}
    		if offset >= maxwidth {
    			base.ErrorfAt(typePos(t), 0, "type %L too large", t)
    			offset = 8 // small but nonzero
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 15K bytes
    - Viewed (0)
Back to top