diff --git a/compiler/expressions.go b/compiler/expressions.go index cad307ba4..5f828ae4d 100644 --- a/compiler/expressions.go +++ b/compiler/expressions.go @@ -794,7 +794,7 @@ func (fc *funcContext) translateCall(e *ast.CallExpr, sig *types.Signature, fun return fc.formatExpr("%s(%s)", fun, strings.Join(args, ", ")) } -// delegatedCall returns a pair of JS expresions representing a callable function +// delegatedCall returns a pair of JS expressions representing a callable function // and its arguments to be invoked elsewhere. // // This function is necessary in conjunction with keywords such as `go` and `defer`, diff --git a/compiler/natives/src/math/math_test.go b/compiler/natives/src/math/math_test.go index ec2022add..eb62dd1d1 100644 --- a/compiler/natives/src/math/math_test.go +++ b/compiler/natives/src/math/math_test.go @@ -7,12 +7,13 @@ import ( "testing" ) -// Slighly higher tolerances than upstream, otherwise TestGamma fails. +// Slightly higher tolerances than upstream, otherwise TestGamma fails. // TODO: Is there a better way to fix TestGamma? It's weird that only one test -// requires increasing tolerances. Perhaps there's a better fix? Maybe we -// should override TestGamma specifically and not the package-wide tolerances, -// because this will cause many other tests to be less accurate. Or maybe this -// is fine? +// +// requires increasing tolerances. Perhaps there's a better fix? Maybe we +// should override TestGamma specifically and not the package-wide tolerances, +// because this will cause many other tests to be less accurate. Or maybe this +// is fine? func close(a, b float64) bool { return tolerance(a, b, 4e-14) } func veryclose(a, b float64) bool { return tolerance(a, b, 6e-15) } diff --git a/compiler/statements.go b/compiler/statements.go index d845792ee..eb0c3e9db 100644 --- a/compiler/statements.go +++ b/compiler/statements.go @@ -315,7 +315,7 @@ func (fc *funcContext) translateStmt(stmt ast.Stmt, label *types.Label) { case token.FALLTHROUGH: // handled in CaseClause default: - panic("Unhandled branch statment: " + s.Tok.String()) + panic("Unhandled branch statement: " + s.Tok.String()) } case *ast.ReturnStmt: diff --git a/js/js.go b/js/js.go index bb1202a62..a1ded9eeb 100644 --- a/js/js.go +++ b/js/js.go @@ -158,7 +158,7 @@ func MakeWrapper(i interface{}) *Object { // and setters // (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) // for the non-embedded exported fields of i. Values accessed via these methods -// and getters are themsevles wrapped when accessed, but an important point to +// and getters are themselves wrapped when accessed, but an important point to // note is that a new wrapped value is created on each access. func MakeFullWrapper(i interface{}) *Object { internalObj := InternalObject(i) diff --git a/tests/testdata/time_inexternalization.go b/tests/testdata/time_inexternalization.go index fe7c064f8..99131b9b4 100644 --- a/tests/testdata/time_inexternalization.go +++ b/tests/testdata/time_inexternalization.go @@ -9,10 +9,10 @@ import ( var _ = time.Sleep // Force "time" package to be imported but let time.Time and time.Unix be DCEed since they're not used. func main() { - // Excercise externalization of Go struct (with its special handling of time.Time). + // Exercise externalization of Go struct (with its special handling of time.Time). js.Global.Get("console").Call("log", struct{ S string }{"externalization ok"}) - // Excercise internalization of JavaScript Date object (with its special handling of time.Time). + // Exercise internalization of JavaScript Date object (with its special handling of time.Time). date := js.Global.Get("Date").New("2015-08-29T20:56:00.869Z").Interface() js.Global.Set("myDate", date) js.Global.Get("console").Call("log", js.Global.Get("myDate").Call("toUTCString"))