1
0
mirror of https://github.com/golang/go synced 2024-11-23 21:50:08 -07:00

all: fix typos as reported by 'misspell'

Change-Id: I904b8655f21743189814bccf24073b6fbb9fc56d
GitHub-Last-Rev: b032c14394
GitHub-Pull-Request: golang/go#29997
Reviewed-on: https://go-review.googlesource.com/c/160421
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Leon Klingele 2019-02-22 15:53:52 +00:00 committed by Brad Fitzpatrick
parent 337662f7ca
commit d090429ea9
11 changed files with 19 additions and 19 deletions

View File

@ -26,7 +26,7 @@ func TestIntendedInlining(t *testing.T) {
t.Parallel()
// want is the list of function names (by package) that should
// be inlinable. If they have no callers in thier packages, they
// be inlinable. If they have no callers in their packages, they
// might not actually be inlined anywhere.
want := map[string][]string{
"runtime": {
@ -218,7 +218,7 @@ func TestIntendedInlining(t *testing.T) {
if m := canInline.FindStringSubmatch(line); m != nil {
fname := m[1]
fullname := curPkg + "." + fname
// If function must be inlined somewhere, beeing inlinable is not enough
// If function must be inlined somewhere, being inlinable is not enough
if _, ok := must[fullname]; !ok {
delete(notInlinedReason, fullname)
continue

View File

@ -1080,7 +1080,7 @@ type dotWriter struct {
}
// newDotWriter returns non-nil value when mask is valid.
// dotWriter will generate SVGs only for the phases specifed in the mask.
// dotWriter will generate SVGs only for the phases specified in the mask.
// mask can contain following patterns and combinations of them:
// * - all of them;
// x-y - x through y, inclusive;

View File

@ -1159,17 +1159,17 @@ var templUserRegionType = template.Must(template.New("").Funcs(template.FuncMap{
d := time.Duration(nsec) * time.Nanosecond
return template.HTML(niceDuration(d))
},
"percent": func(dividened, divisor int64) template.HTML {
"percent": func(dividend, divisor int64) template.HTML {
if divisor == 0 {
return ""
}
return template.HTML(fmt.Sprintf("(%.1f%%)", float64(dividened)/float64(divisor)*100))
return template.HTML(fmt.Sprintf("(%.1f%%)", float64(dividend)/float64(divisor)*100))
},
"barLen": func(dividened, divisor int64) template.HTML {
"barLen": func(dividend, divisor int64) template.HTML {
if divisor == 0 {
return "0"
}
return template.HTML(fmt.Sprintf("%.2f%%", float64(dividened)/float64(divisor)*100))
return template.HTML(fmt.Sprintf("%.2f%%", float64(dividend)/float64(divisor)*100))
},
"unknownTime": func(desc regionDesc) int64 {
sum := desc.ExecTime + desc.IOTime + desc.BlockTime + desc.SyscallTime + desc.SchedWaitTime

View File

@ -166,17 +166,17 @@ var templGoroutine = template.Must(template.New("").Funcs(template.FuncMap{
d := time.Duration(nsec) * time.Nanosecond
return template.HTML(niceDuration(d))
},
"percent": func(dividened, divisor int64) template.HTML {
"percent": func(dividend, divisor int64) template.HTML {
if divisor == 0 {
return ""
}
return template.HTML(fmt.Sprintf("(%.1f%%)", float64(dividened)/float64(divisor)*100))
return template.HTML(fmt.Sprintf("(%.1f%%)", float64(dividend)/float64(divisor)*100))
},
"barLen": func(dividened, divisor int64) template.HTML {
"barLen": func(dividend, divisor int64) template.HTML {
if divisor == 0 {
return "0"
}
return template.HTML(fmt.Sprintf("%.2f%%", float64(dividened)/float64(divisor)*100))
return template.HTML(fmt.Sprintf("%.2f%%", float64(dividend)/float64(divisor)*100))
},
"unknownTime": func(desc *trace.GDesc) int64 {
sum := desc.ExecTime + desc.IOTime + desc.BlockTime + desc.SyscallTime + desc.SchedWaitTime

View File

@ -334,8 +334,8 @@ func NewFile(r io.ReaderAt) (*File, error) {
// If this symbol is a function, it must retrieve its size from
// its AUX_FCN entry.
// It can happend that a function symbol doesn't have any AUX_FCN.
// In this case, needAuxFcn is false and their size will be set to 0
// It can happen that a function symbol doesn't have any AUX_FCN.
// In this case, needAuxFcn is false and their size will be set to 0.
if needAuxFcn {
switch f.TargetMachine {
case U802TOCMAGIC:

View File

@ -1013,7 +1013,7 @@ func TestStatOfInvalidName(t *testing.T) {
// It returns path to the found drive root directory (like Z:\) or error.
func findUnusedDriveLetter() (string, error) {
// Do not use A: and B:, because they are reserved for floppy drive.
// Do not use C:, becasue it is normally used for main drive.
// Do not use C:, because it is normally used for main drive.
for l := 'Z'; l >= 'D'; l-- {
p := string(l) + `:\`
_, err := os.Stat(p)

View File

@ -45,7 +45,7 @@ func sysReserve(v unsafe.Pointer, n uintptr) unsafe.Pointer {
flags := int32(_MAP_ANON | _MAP_PRIVATE)
if raceenabled && GOOS == "darwin" {
// Currently the race detector expects memory to live within a certain
// range, and on Darwin 10.10 mmap is prone to ignoring hints, moreso
// range, and on Darwin 10.10 mmap is prone to ignoring hints, more so
// than later versions and other BSDs (#26475). So, even though it's
// potentially dangerous to MAP_FIXED, we do it in the race detection
// case because it'll help maintain the race detector's invariants.

View File

@ -274,7 +274,7 @@ func (s *stackScanState) addObject(addr uintptr, typ *_type) {
obj.off = uint32(addr - s.stack.lo)
obj.size = uint32(typ.size)
obj.setType(typ)
// obj.left and obj.right will be initalized by buildIndex before use.
// obj.left and obj.right will be initialized by buildIndex before use.
s.nobjs++
}

View File

@ -475,7 +475,7 @@ func FuncForPC(pc uintptr) *Func {
}
if inldata := funcdata(f, _FUNCDATA_InlTree); inldata != nil {
// Note: strict=false so bad PCs (those between functions) don't crash the runtime.
// We just report the preceeding function in that situation. See issue 29735.
// We just report the preceding function in that situation. See issue 29735.
// TODO: Perhaps we should report no function at all in that case.
// The runtime currently doesn't have function end info, alas.
if ix := pcdatavalue1(f, _PCDATA_InlTreeIndex, pc, nil, false); ix >= 0 {

View File

@ -388,7 +388,7 @@ func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error)
func (sa *RawSockaddrUnix) getLen() (int, error) {
// Some versions of AIX have a bug in getsockname (see IV78655).
// We can't rely on sa.Len being set correctly.
n := SizeofSockaddrUnix - 3 // substract leading Family, Len, terminating NUL.
n := SizeofSockaddrUnix - 3 // subtract leading Family, Len, terminating NUL.
for i := 0; i < n; i++ {
if sa.Path[i] == 0 {
n = i

View File

@ -614,7 +614,7 @@ func (c *common) log(s string) {
c.logDepth(s, 3) // logDepth + log + public function
}
// logDepth generates the output. At an arbitary stack depth
// logDepth generates the output at an arbitrary stack depth.
func (c *common) logDepth(s string, depth int) {
c.mu.Lock()
defer c.mu.Unlock()