Skip to content

Commit

Permalink
all: fix typos
Browse files Browse the repository at this point in the history
Use the following (suboptimal) script to obtain a list of possible
typos:

  #!/usr/bin/env sh

  set -x

  git ls-files |\
    grep -e '\.\(c\|cc\|go\)$' |\
    xargs -n 1\
    awk\
    '/\/\// { gsub(/.*\/\//, ""); print; } /\/\*/, /\*\// { gsub(/.*\/\*/, ""); gsub(/\*\/.*/, ""); }' |\
    hunspell -d en_US -l |\
    grep '^[[:upper:]]\{0,1\}[[:lower:]]\{1,\}$' |\
    grep -v -e '^.\{1,4\}$' -e '^.\{16,\}$' |\
    sort -f |\
    uniq -c |\
    awk '$1 == 1 { print $2; }'

Then, go through the results manually and fix the most obvious typos in
the non-vendored code.

Change-Id: I3cb5830a176850e1a0584b8a40b47bde7b260eae
Reviewed-on: https://go-review.googlesource.com/c/go/+/193848
Reviewed-by: Robert Griesemer <gri@golang.org>
  • Loading branch information
ainar-g authored and griesemer committed Sep 8, 2019
1 parent 83a78eb commit 0efbd10
Show file tree
Hide file tree
Showing 63 changed files with 78 additions and 78 deletions.
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/gc/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -1294,7 +1294,7 @@ type constSetKey struct {
// equal value and identical type has already been added, then add
// reports an error about the duplicate value.
//
// pos provides position information for where expression n occured
// pos provides position information for where expression n occurred
// (in case n does not have its own position information). what and
// where are used in the error message.
//
Expand Down
6 changes: 3 additions & 3 deletions src/cmd/compile/internal/gc/escape.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
// First, we construct a directed weighted graph where vertices
// (termed "locations") represent variables allocated by statements
// and expressions, and edges represent assignments between variables
// (with weights reperesenting addressing/dereference counts).
// (with weights representing addressing/dereference counts).
//
// Next we walk the graph looking for assignment paths that might
// violate the invariants stated above. If a variable v's address is
Expand All @@ -33,7 +33,7 @@ import (
//
// To support interprocedural analysis, we also record data-flow from
// each function's parameters to the heap and to its result
// parameters. This information is summarized as "paremeter tags",
// parameters. This information is summarized as "parameter tags",
// which are used at static call sites to improve escape analysis of
// function arguments.

Expand All @@ -44,7 +44,7 @@ import (
// "location."
//
// We also model every Go assignment as a directed edges between
// locations. The number of derefence operations minus the number of
// locations. The number of dereference operations minus the number of
// addressing operations is recorded as the edge's weight (termed
// "derefs"). For example:
//
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/gc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ func Main(archInit func(*Arch)) {
fcount++
}
}
// With all types ckecked, it's now safe to verify map keys. One single
// With all types checked, it's now safe to verify map keys. One single
// check past phase 9 isn't sufficient, as we may exit with other errors
// before then, thus skipping map key errors.
checkMapKeys()
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/gc/sinit.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ func isStaticCompositeLiteral(n *Node) bool {
// literal components of composite literals.
// Dynamic initialization represents non-literals and
// non-literal components of composite literals.
// LocalCode initializion represents initialization
// LocalCode initialization represents initialization
// that occurs purely in generated code local to the function of use.
// Initialization code is sometimes generated in passes,
// first static then dynamic.
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/gc/ssa.go
Original file line number Diff line number Diff line change
Expand Up @@ -1645,7 +1645,7 @@ var fpConvOpToSSA32 = map[twoTypes]twoOpsAndType{
twoTypes{TFLOAT64, TUINT32}: twoOpsAndType{ssa.OpCvt64Fto32U, ssa.OpCopy, TUINT32},
}

// uint64<->float conversions, only on machines that have intructions for that
// uint64<->float conversions, only on machines that have instructions for that
var uint64fpConvOpToSSA = map[twoTypes]twoOpsAndType{
twoTypes{TUINT64, TFLOAT32}: twoOpsAndType{ssa.OpCopy, ssa.OpCvt64Uto32F, TUINT64},
twoTypes{TUINT64, TFLOAT64}: twoOpsAndType{ssa.OpCopy, ssa.OpCvt64Uto64F, TUINT64},
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/gc/syntax.go
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ const (
ORECV // <-Left
ORUNESTR // Type(Left) (Type is string, Left is rune)
OSELRECV // Left = <-Right.Left: (appears as .Left of OCASE; Right.Op == ORECV)
OSELRECV2 // List = <-Right.Left: (apperas as .Left of OCASE; count(List) == 2, Right.Op == ORECV)
OSELRECV2 // List = <-Right.Left: (appears as .Left of OCASE; count(List) == 2, Right.Op == ORECV)
OIOTA // iota
OREAL // real(Left)
OIMAG // imag(Left)
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/gc/walk.go
Original file line number Diff line number Diff line change
Expand Up @@ -1265,7 +1265,7 @@ opswitch:
}
// Map initialization with a variable or large hint is
// more complicated. We therefore generate a call to
// runtime.makemap to intialize hmap and allocate the
// runtime.makemap to initialize hmap and allocate the
// map buckets.

// When hint fits into int, use makemap instead of
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/ssa/branchelim.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ func shouldElimIfElse(no, yes, post *Block, arch string) bool {
cost := phi * 1
if phi > 1 {
// If we have more than 1 phi and some values in post have args
// in yes or no blocks, we may have to recalucalte condition, because
// in yes or no blocks, we may have to recalculate condition, because
// those args may clobber flags. For now assume that all operations clobber flags.
cost += other * 1
}
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/ssa/deadstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func elimDeadAutosGeneric(f *Func) {
}
return
case OpStore, OpMove, OpZero:
// v should be elimated if we eliminate the auto.
// v should be eliminated if we eliminate the auto.
n, ok := addr[args[0]]
if ok && elim[v] == nil {
elim[v] = n
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/ssa/debug_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ func replaceEnv(env []string, ev string, evv string) []string {
}

// asCommandLine renders cmd as something that could be copy-and-pasted into a command line
// If cwd is not empty and different from the command's directory, prepend an approprirate "cd"
// If cwd is not empty and different from the command's directory, prepend an appropriate "cd"
func asCommandLine(cwd string, cmd *exec.Cmd) string {
s := "("
if cmd.Dir != "" && cmd.Dir != cwd {
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/ssa/gen/PPC64Ops.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func init() {

{name: "POPCNTD", argLength: 1, reg: gp11, asm: "POPCNTD"}, // number of set bits in arg0
{name: "POPCNTW", argLength: 1, reg: gp11, asm: "POPCNTW"}, // number of set bits in each word of arg0 placed in corresponding word
{name: "POPCNTB", argLength: 1, reg: gp11, asm: "POPCNTB"}, // number of set bits in each byte of arg0 placed in corresonding byte
{name: "POPCNTB", argLength: 1, reg: gp11, asm: "POPCNTB"}, // number of set bits in each byte of arg0 placed in corresponding byte

{name: "FDIV", argLength: 2, reg: fp21, asm: "FDIV"}, // arg0/arg1
{name: "FDIVS", argLength: 2, reg: fp21, asm: "FDIVS"}, // arg0/arg1
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/ssa/gen/S390XOps.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ func init() {
{name: "LoweredPanicBoundsB", argLength: 3, aux: "Int64", reg: regInfo{inputs: []regMask{r1, r2}}, typ: "Mem"}, // arg0=idx, arg1=len, arg2=mem, returns memory. AuxInt contains report code (see PanicBounds in generic.go).
{name: "LoweredPanicBoundsC", argLength: 3, aux: "Int64", reg: regInfo{inputs: []regMask{r0, r1}}, typ: "Mem"}, // arg0=idx, arg1=len, arg2=mem, returns memory. AuxInt contains report code (see PanicBounds in generic.go).

// Constant conditon code values. The condition code can be 0, 1, 2 or 3.
// Constant condition code values. The condition code can be 0, 1, 2 or 3.
{name: "FlagEQ"}, // CC=0 (equal)
{name: "FlagLT"}, // CC=1 (less than)
{name: "FlagGT"}, // CC=2 (greater than)
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/ssa/gen/genericOps.go
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ var genericOps = []opData{

{name: "VarDef", argLength: 1, aux: "Sym", typ: "Mem", symEffect: "None", zeroWidth: true}, // aux is a *gc.Node of a variable that is about to be initialized. arg0=mem, returns mem
{name: "VarKill", argLength: 1, aux: "Sym", symEffect: "None"}, // aux is a *gc.Node of a variable that is known to be dead. arg0=mem, returns mem
// TODO: what's the difference betweeen VarLive and KeepAlive?
// TODO: what's the difference between VarLive and KeepAlive?
{name: "VarLive", argLength: 1, aux: "Sym", symEffect: "Read", zeroWidth: true}, // aux is a *gc.Node of a variable that must be kept live. arg0=mem, returns mem
{name: "KeepAlive", argLength: 2, typ: "Mem", zeroWidth: true}, // arg[0] is a value that must be kept alive until this mark. arg[1]=mem, returns mem

Expand Down
4 changes: 2 additions & 2 deletions src/cmd/compile/internal/ssa/gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ type regInfo struct {
// clobbers encodes the set of registers that are overwritten by
// the instruction (other than the output registers).
clobbers regMask
// outpus[i] encodes the set of registers allowed for the i'th output.
// outputs[i] encodes the set of registers allowed for the i'th output.
outputs []regMask
}

Expand Down Expand Up @@ -430,7 +430,7 @@ func (a arch) Name() string {
//
// Note that there is no limit on the concurrency at the moment. On a four-core
// laptop at the time of writing, peak RSS usually reached ~230MiB, which seems
// doable by practially any machine nowadays. If that stops being the case, we
// doable by practically any machine nowadays. If that stops being the case, we
// can cap this func to a fixed number of architectures being generated at once.
func genLower() {
var wg sync.WaitGroup
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/ssa/gen/rulegen.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ type Node interface{}
// ast.Stmt under some limited circumstances.
type Statement interface{}

// bodyBase is shared by all of our statement psuedo-node types which can
// bodyBase is shared by all of our statement pseudo-node types which can
// contain other statements.
type bodyBase struct {
list []Statement
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/ssa/loopbce.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func findIndVar(f *Func) []indVar {
// Handle induction variables of these forms.
// KNN is known-not-negative.
// SIGNED ARITHMETIC ONLY. (see switch on b.Control.Op above)
// Possibilitis for KNN are len and cap; perhaps we can infer others.
// Possibilities for KNN are len and cap; perhaps we can infer others.
// for i := 0; i <= KNN-k ; i += k
// for i := 0; i < KNN-(k-1); i += k
// Also handle decreasing.
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/compile/internal/ssa/regalloc.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ func (s *regAllocState) allocReg(mask regMask, v *Value) register {

if s.f.Config.ctxt.Arch.Arch == sys.ArchWasm {
// TODO(neelance): In theory this should never happen, because all wasm registers are equal.
// So if there is still a free register, the allocation should have picked that one in the first place insead of
// So if there is still a free register, the allocation should have picked that one in the first place instead of
// trying to kick some other value out. In practice, this case does happen and it breaks the stack optimization.
s.freeReg(r)
return r
Expand Down Expand Up @@ -489,7 +489,7 @@ func (s *regAllocState) allocValToReg(v *Value, mask regMask, nospill bool, pos
}

var r register
// If nospill is set, the value is used immedately, so it can live on the WebAssembly stack.
// If nospill is set, the value is used immediately, so it can live on the WebAssembly stack.
onWasmStack := nospill && s.f.Config.ctxt.Arch.Arch == sys.ArchWasm
if !onWasmStack {
// Allocate a register.
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/ssa/sparsetree.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func (t SparseTree) domorder(x *Block) int32 {
// entry(x) < entry(y) allows cases x-dom-y and x-then-y.
// But by supposition, x does not dominate y. So we have x-then-y.
//
// For contractidion, assume x dominates z.
// For contradiction, assume x dominates z.
// Then entry(x) < entry(z) < exit(z) < exit(x).
// But we know x-then-y, so entry(x) < exit(x) < entry(y) < exit(y).
// Combining those, entry(x) < entry(z) < exit(z) < exit(x) < entry(y) < exit(y).
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/go/go_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ func TestMain(m *testing.M) {
// (installed in GOROOT/pkg/tool/GOOS_GOARCH).
// If these are not the same toolchain, then the entire standard library
// will look out of date (the compilers in those two different tool directories
// are built for different architectures and have different buid IDs),
// are built for different architectures and have different build IDs),
// which will cause many tests to do unnecessary rebuilds and some
// tests to attempt to overwrite the installed standard library.
// Bail out entirely in this case.
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/go/internal/modfetch/coderepo.go
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ func (r *codeRepo) findDir(version string) (rev, dir string, gomod []byte, err e
// the real module, found at a different path, usable only in
// a replace directive.
//
// TODO(bcmills): This doesn't seem right. Investigate futher.
// TODO(bcmills): This doesn't seem right. Investigate further.
// (Notably: why can't we replace foo/v2 with fork-of-foo/v3?)
dir2 := path.Join(r.codeDir, r.pathMajor[1:])
file2 = path.Join(dir2, "go.mod")
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/go/internal/search/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ func TreeCanMatchPattern(pattern string) func(name string) bool {
//
// First, /... at the end of the pattern can match an empty string,
// so that net/... matches both net and packages in its subdirectories, like net/http.
// Second, any slash-separted pattern element containing a wildcard never
// Second, any slash-separated pattern element containing a wildcard never
// participates in a match of the "vendor" element in the path of a vendored
// package, so that ./... does not match packages in subdirectories of
// ./vendor or ./mycode/vendor, but ./vendor/... and ./mycode/vendor/... do.
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/go/internal/search/search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var matchPatternTests = `
match net net/http
not not/http not/net/http netchan
# Second, any slash-separted pattern element containing a wildcard never
# Second, any slash-separated pattern element containing a wildcard never
# participates in a match of the "vendor" element in the path of a vendored
# package, so that ./... does not match packages in subdirectories of
# ./vendor or ./mycode/vendor, but ./vendor/... and ./mycode/vendor/... do.
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/go/internal/sumweb/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func NewConn(client Client) *Conn {
}
}

// init initiailzes the conn (if not already initialized)
// init initializes the conn (if not already initialized)
// and returns any initialization error.
func (c *Conn) init() error {
c.initOnce.Do(c.initWork)
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/go/internal/tlog/tlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func NodeHash(left, right Hash) Hash {
func StoredHashIndex(level int, n int64) int64 {
// Level L's n'th hash is written right after level L+1's 2n+1'th hash.
// Work our way down to the level 0 ordering.
// We'll add back the orignal level count at the end.
// We'll add back the original level count at the end.
for l := level; l > 0; l-- {
n = 2*n + 1
}
Expand Down Expand Up @@ -155,7 +155,7 @@ func SplitStoredHashIndex(index int64) (level int, n int64) {
n++
indexN = x
}
// The hash we want was commited with record n,
// The hash we want was committed with record n,
// meaning it is one of (0, n), (1, n/2), (2, n/4), ...
level = int(index - indexN)
return level, n >> uint(level)
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/go/internal/work/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ func (b *Builder) addInstallHeaderAction(a *Action) {
}

// buildmodeShared takes the "go build" action a1 into the building of a shared library of a1.Deps.
// That is, the input a1 represents "go build pkgs" and the result represents "go build -buidmode=shared pkgs".
// That is, the input a1 represents "go build pkgs" and the result represents "go build -buildmode=shared pkgs".
func (b *Builder) buildmodeShared(mode, depMode BuildMode, args []string, pkgs []*load.Package, a1 *Action) *Action {
name, err := libname(args, pkgs)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/go/internal/work/gccgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ func (tools gccgoToolchain) link(b *Builder, root *Action, out, importcfg string
}

if haveShlib[filepath.Base(a.Target)] {
// This is a shared library we want to link againt.
// This is a shared library we want to link against.
if !addedShlib[a.Target] {
shlibs = append(shlibs, a.Target)
addedShlib[a.Target] = true
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/internal/obj/arm64/asm7.go
Original file line number Diff line number Diff line change
Expand Up @@ -1561,7 +1561,7 @@ func rclass(r int16) int {
return C_GOK
}

// con32class reclassifies the constant of 32-bit instruction. Becuase the constant type is 32-bit,
// con32class reclassifies the constant of 32-bit instruction. Because the constant type is 32-bit,
// but saved in Offset which type is int64, con32class treats it as uint32 type and reclassifies it.
func (c *ctxt7) con32class(a *obj.Addr) int {
v := uint32(a.Offset)
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/internal/obj/objfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ func (ctxt *Link) DwarfAbstractFunc(curfn interface{}, s *LSym, myimportpath str
}
}

// This table is designed to aid in the creation of references betweeen
// This table is designed to aid in the creation of references between
// DWARF subprogram DIEs.
//
// In most cases when one DWARF DIE has to refer to another DWARF DIE,
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/internal/obj/x86/asm6.go
Original file line number Diff line number Diff line change
Expand Up @@ -3055,7 +3055,7 @@ func (ab *AsmBuf) Put(b []byte) {
}

// PutOpBytesLit writes zero terminated sequence of bytes from op,
// starting at specified offsed (e.g. z counter value).
// starting at specified offset (e.g. z counter value).
// Trailing 0 is not written.
//
// Intended to be used for literal Z cases.
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/link/internal/ld/pe.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ type peStringTable struct {
stringsLen int
}

// size resturns size of string table t.
// size returns size of string table t.
func (t *peStringTable) size() int {
// string table starts with 4-byte length at the beginning
return t.stringsLen + 4
Expand Down
6 changes: 3 additions & 3 deletions src/cmd/link/internal/ld/xcoff.go
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ func logBase2(a int) uint8 {
return uint8(bits.Len(uint(a)) - 1)
}

// Write symbols needed when a new file appared :
// Write symbols needed when a new file appeared:
// - a C_FILE with one auxiliary entry for its name
// - C_DWARF symbols to provide debug information
// - a C_HIDEXT which will be a csect containing all of its functions
Expand Down Expand Up @@ -663,7 +663,7 @@ func (f *xcoffFile) writeSymbolNewFile(ctxt *Link, name string, firstEntry uint6
// Find the size of this corresponding package DWARF compilation unit.
// This size is set during DWARF generation (see dwarf.go).
dwsize = getDwsectCUSize(sect.Name, name)
// .debug_abbrev is commun to all packages and not found with the previous function
// .debug_abbrev is common to all packages and not found with the previous function
if sect.Name == ".debug_abbrev" {
s := ctxt.Syms.ROLookup(sect.Name, 0)
dwsize = uint64(s.Size)
Expand Down Expand Up @@ -779,7 +779,7 @@ func (f *xcoffFile) writeSymbolFunc(ctxt *Link, x *sym.Symbol) []xcoffSym {
// in the current file.
// Same goes for runtime.text.X symbols.
} else if x.File == "" { // Undefined global symbol
// If this happens, the algorithme must be redone.
// If this happens, the algorithm must be redone.
if currSymSrcFile.name != "" {
Exitf("undefined global symbol found inside another file")
}
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/tls/handshake_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ func mutualProtocol(protos, preferenceProtos []string) (string, bool) {
return protos[0], true
}

// hostnameInSNI converts name into an approriate hostname for SNI.
// hostnameInSNI converts name into an appropriate hostname for SNI.
// Literal IP addresses and absolute FQDNs are not permitted as SNI values.
// See RFC 6066, Section 3.
func hostnameInSNI(name string) string {
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/tls/prf.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ func (h *finishedHash) discardHandshakeBuffer() {
}

// noExportedKeyingMaterial is used as a value of
// ConnectionState.ekm when renegotation is enabled and thus
// ConnectionState.ekm when renegotiation is enabled and thus
// we wish to fail all key-material export requests.
func noExportedKeyingMaterial(label string, context []byte, length int) ([]byte, error) {
return nil, errors.New("crypto/tls: ExportKeyingMaterial is unavailable when renegotiation is enabled")
Expand Down
6 changes: 3 additions & 3 deletions src/crypto/x509/name_constraints_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,7 @@ var nameConstraintsTests = []nameConstraintsTest{
// that we can process CA certificates in the wild that have invalid SANs.
// See https://github.com/golang/go/issues/23995

// #77: an invalid DNS or mail SAN will not be detected if name constaint
// #77: an invalid DNS or mail SAN will not be detected if name constraint
// checking is not triggered.
{
roots: make([]constraintsSpec, 1),
Expand Down Expand Up @@ -1631,7 +1631,7 @@ func makeConstraintsCACert(constraints constraintsSpec, name string, key *ecdsa.
NotAfter: time.Unix(2000, 0),
KeyUsage: KeyUsageCertSign,
BasicConstraintsValid: true,
IsCA: true,
IsCA: true,
}

if err := addConstraintsToTemplate(constraints, template); err != nil {
Expand Down Expand Up @@ -1668,7 +1668,7 @@ func makeConstraintsLeafCert(leaf leafSpec, key *ecdsa.PrivateKey, parent *Certi
NotAfter: time.Unix(2000, 0),
KeyUsage: KeyUsageDigitalSignature,
BasicConstraintsValid: true,
IsCA: false,
IsCA: false,
}

for _, name := range leaf.sans {
Expand Down
2 changes: 1 addition & 1 deletion src/database/sql/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ func callValuerValue(vr driver.Valuer) (v driver.Value, err error) {
// coefficient (also known as a significand) as a []byte, and an int32 exponent.
// These are composed into a final value as "decimal = (neg) (form=finite) coefficient * 10 ^ exponent".
// A zero length coefficient is a zero value.
// The big-endian integer coefficent stores the most significant byte first (at coefficent[0]).
// The big-endian integer coefficient stores the most significant byte first (at coefficient[0]).
// If the form is not finite the coefficient and exponent should be ignored.
// The negative parameter may be set to true for any form, although implementations are not required
// to respect the negative parameter in the non-finite form.
Expand Down
Loading

0 comments on commit 0efbd10

Please sign in to comment.