1. 04 Jun, 2018 8 commits
  2. 02 Jun, 2018 1 commit
  3. 01 Jun, 2018 7 commits
  4. 31 May, 2018 15 commits
  5. 30 May, 2018 9 commits
    • Audrius Butkevicius's avatar
      net: add ListenConfig, Dialer.Control to permit socket opts before listen/dial · 3c4d3bdd
      Audrius Butkevicius authored
      Existing implementation does not provide a way to set options such as
      SO_REUSEPORT, that has to be set prior the socket being bound.
      
      New exposed API:
      pkg net, method (*ListenConfig) Listen(context.Context, string, string) (Listener, error)
      pkg net, method (*ListenConfig) ListenPacket(context.Context, string, string) (PacketConn, error)
      pkg net, type ListenConfig struct
      pkg net, type ListenConfig struct, Control func(string, string, syscall.RawConn) error
      pkg net, type Dialer struct, Control func(string, string, syscall.RawConn) error
      
      Fixes #9661
      
      Change-Id: If4d275711f823df72d3ac5cc3858651a6a57cccb
      Reviewed-on: https://go-review.googlesource.com/72810
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      3c4d3bdd
    • Ian Lance Taylor's avatar
      cmd/go: accept more safe CFLAGS/LDFLAGS · cc6e568c
      Ian Lance Taylor authored
      Fixes #23749
      Fixes #24703
      Fixes #24858
      
      Change-Id: Ib32d8efee294004c70fdd602087df2da0867f099
      Reviewed-on: https://go-review.googlesource.com/115415
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      cc6e568c
    • Mikio Hara's avatar
      net/http: use DialWithConn method of socks.Dialer · 999e230a
      Mikio Hara authored
      This change uses the DialWithConn method of socks.Dialer to ensure that
      the bundled SOCKS client implementation is agnostic to the behavior and
      capabilities of transport connections.
      
      Also updates the bundled golang.org/x/net/internal/socks at git rev
      7594486. (golang.org/cl/110135)
      
      Updates #25104.
      
      Change-Id: I87c2e99eeb857f182ea5d8ef569181d4f45f2e5d
      Reviewed-on: https://go-review.googlesource.com/110136
      Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      999e230a
    • Tobias Klauser's avatar
      os/exec: gofmt · 7ea2c8cf
      Tobias Klauser authored
      CL 109361 introduced some changes which were not properly gofmt'ed.
      Because the CL was sent via Github no gofmt checks were performed
      on it (cf. #24946, #18548).
      
      Change-Id: I207065f01161044c420e272f4fd112e0a59be259
      Reviewed-on: https://go-review.googlesource.com/115356
      Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
      Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      7ea2c8cf
    • Ilya Tocar's avatar
      strconv: simplify (*extFloat).Normalize · 323c8586
      Ilya Tocar authored
      Use math/bits.LeadingZeros64 instead of local implementation.
      This simplifies code, makes Normalize inlinable and fixes performance regression.
      Idea was suggested by Giovanni Bajo in #25298
      
      Performance results below:
      Atof64Decimal-6                          46.7ns ± 0%  46.7ns ± 0%     ~     (all equal)
      Atof64Float-6                            57.9ns ± 1%  56.9ns ± 0%   -1.72%  (p=0.000 n=10+9)
      Atof64FloatExp-6                          163ns ± 0%   123ns ± 0%  -24.54%  (p=0.002 n=8+10)
      Atof64Big-6                               222ns ± 1%   185ns ± 1%  -16.65%  (p=0.000 n=9+10)
      Atof64RandomBits-6                        155ns ± 2%   154ns ± 3%     ~     (p=0.225 n=10+10)
      Atof64RandomFloats-6                      156ns ± 2%   154ns ± 2%     ~     (p=0.124 n=10+9)
      Atof32Decimal-6                          47.3ns ± 0%  46.7ns ± 0%   -1.26%  (p=0.000 n=7+9)
      Atof32Float-6                            51.5ns ± 1%  51.6ns ± 1%     ~     (p=0.455 n=10+9)
      Atof32FloatExp-6                          163ns ± 1%   124ns ± 1%  -24.36%  (p=0.000 n=10+10)
      Atof32Random-6                            199ns ± 1%   163ns ± 0%  -17.93%  (p=0.000 n=10+10)
      FormatFloat/Decimal-6                     209ns ± 2%   211ns ± 2%     ~     (p=0.402 n=10+10)
      FormatFloat/Float-6                       393ns ± 2%   379ns ± 1%   -3.57%  (p=0.000 n=10+10)
      FormatFloat/Exp-6                         333ns ± 2%   321ns ± 1%   -3.56%  (p=0.000 n=10+9)
      FormatFloat/NegExp-6                      338ns ± 3%   317ns ± 1%   -6.27%  (p=0.000 n=10+9)
      FormatFloat/Big-6                         457ns ± 1%   443ns ± 2%   -2.99%  (p=0.000 n=9+10)
      FormatFloat/BinaryExp-6                   230ns ± 2%   232ns ± 2%     ~     (p=0.070 n=10+10)
      FormatFloat/32Integer-6                   209ns ± 2%   211ns ± 1%     ~     (p=0.203 n=10+8)
      FormatFloat/32ExactFraction-6             330ns ± 2%   319ns ± 1%   -3.42%  (p=0.000 n=10+10)
      FormatFloat/32Point-6                     393ns ± 2%   377ns ± 1%   -4.15%  (p=0.000 n=10+10)
      FormatFloat/32Exp-6                       331ns ± 2%   318ns ± 2%   -4.02%  (p=0.000 n=10+10)
      FormatFloat/32NegExp-6                    327ns ± 2%   315ns ± 2%   -3.70%  (p=0.000 n=10+10)
      FormatFloat/64Fixed1-6                    265ns ± 2%   253ns ± 2%   -4.38%  (p=0.000 n=10+10)
      FormatFloat/64Fixed2-6                    278ns ± 2%   262ns ± 3%   -5.71%  (p=0.000 n=10+10)
      FormatFloat/64Fixed3-6                    271ns ± 2%   260ns ± 2%   -4.03%  (p=0.000 n=10+10)
      FormatFloat/64Fixed4-6                    277ns ± 3%   267ns ± 1%   -3.55%  (p=0.000 n=10+9)
      FormatFloat/Slowpath64-6                 71.0µs ± 0%  71.0µs ± 0%     ~     (p=0.744 n=10+8)
      AppendFloat/Decimal-6                     100ns ± 1%   100ns ± 0%     ~     (p=0.294 n=10+8)
      AppendFloat/Float-6                       273ns ± 0%   260ns ± 1%   -4.87%  (p=0.000 n=7+10)
      AppendFloat/Exp-6                         213ns ± 0%   200ns ± 0%   -6.29%  (p=0.000 n=8+10)
      AppendFloat/NegExp-6                      211ns ± 0%   198ns ± 0%   -6.16%  (p=0.000 n=8+8)
      AppendFloat/Big-6                         319ns ± 0%   305ns ± 0%   -4.31%  (p=0.000 n=8+7)
      AppendFloat/BinaryExp-6                  98.4ns ± 0%  92.9ns ± 0%   -5.63%  (p=0.000 n=9+8)
      AppendFloat/32Integer-6                   101ns ± 1%   102ns ± 1%   +0.89%  (p=0.004 n=10+10)
      AppendFloat/32ExactFraction-6             222ns ± 1%   210ns ± 0%   -5.28%  (p=0.000 n=10+9)
      AppendFloat/32Point-6                     273ns ± 1%   261ns ± 1%   -4.62%  (p=0.000 n=10+9)
      AppendFloat/32Exp-6                       209ns ± 1%   197ns ± 0%   -5.56%  (p=0.000 n=10+9)
      AppendFloat/32NegExp-6                    207ns ± 1%   194ns ± 1%   -6.18%  (p=0.000 n=10+10)
      AppendFloat/64Fixed1-6                    145ns ± 0%   131ns ± 1%   -9.93%  (p=0.000 n=9+10)
      AppendFloat/64Fixed2-6                    160ns ± 0%   146ns ± 0%   -8.58%  (p=0.000 n=10+8)
      AppendFloat/64Fixed3-6                    147ns ± 1%   132ns ± 1%  -10.25%  (p=0.000 n=10+10)
      AppendFloat/64Fixed4-6                    161ns ± 1%   149ns ± 0%   -7.93%  (p=0.000 n=10+10)
      AppendFloat/Slowpath64-6                 70.6µs ± 1%  70.9µs ± 0%   +0.37%  (p=0.000 n=10+8)
      
      Change-Id: I63bbc40905abd795fbd24743604c790023d11a43
      Reviewed-on: https://go-review.googlesource.com/113256
      Run-TryBot: Ilya Tocar <ilya.tocar@intel.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
      323c8586
    • Audrius Butkevicius's avatar
      net: fix leftover variable names from CL 115175 · 9b49edef
      Audrius Butkevicius authored
      Change-Id: I5f78fe3286bf4667b6922c57c5701c09bf56e182
      Reviewed-on: https://go-review.googlesource.com/115355Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      9b49edef
    • Alan Donovan's avatar
      go/types: fix typo causing loss of embedded interfaces · 0b8d9d42
      Alan Donovan authored
      Simplified the code per prior suggestion to avoid that
      kind of error in the first place.
      
      Also: Fix subtle error in Interface.Complete where an
      interface may have ended up incomplete if both the list
      of methods and the list of embedded interfaces was nil.
      
      Expanded existing test to cover all these cases.
      
      Fixes golang/go#25577
      
      Change-Id: If8723a8b0c4570f02b3dadfa390f96dd98ce11c8
      Reviewed-on: https://go-review.googlesource.com/114504
      Run-TryBot: Robert Griesemer <gri@golang.org>
      Reviewed-by: 's avatarAlan Donovan <adonovan@google.com>
      Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
      0b8d9d42
    • Russ Cox's avatar
      cmd/go: add minimal module-awareness for legacy operation · d4e21288
      Russ Cox authored
      We want authors to be able to publish code that works with both
      the current standard go command and the planned new go command
      support for modules. If authors have tagged their code v2 or later,
      semantic import versioning means the import paths must include a
      v2 path element after the path prefix naming the module.
      One option for making this convention compatible with original go get
      is to move code into a v2 subdirectory of the root.
      That makes sense for some authors, but many authors would prefer
      not to move all the code into a v2 subdirectory for a transition and
      then move it back up once we everyone has a module-aware go command.
      
      Instead, this CL teaches the old (non-module-aware) go command
      a tiny amount about modules and their import paths, to expand
      the options for authors who want to publish compatible packages.
      If an author has a v2 of a package, say my/thing/v2/sub/pkg,
      in the my/thing repo's sub/pkg subdirectory (no v2 in the file system path),
      then old go get continues to import that package as my/thing/sub/pkg.
      But when go get is processing code in any module (code in a tree with
      a go.mod file) and encounters a path like my/thing/v2/sub/pkg,
      it will check to see if my/thing/go.mod says "module my/thing/v2".
      If so, the go command will read the import my/thing/v2/sub/pkg
      as if it said my/thing/sub/pkg, which is the correct "old" import path
      for the package in question.
      
      This CL will be back-ported to Go 1.10 and Go 1.9 as well.
      
      Once users have updated to the latest Go point releases containing
      this new logic, authors will be able to update to using modules
      within their own repos, including using semantic import paths
      with vN path elements, and old go get will still be able to consume
      those repositories.
      
      This CL also makes "go get" ignore meta go-import lines using
      the new "mod" VCS type. This allows a package to specify both
      a "mod" type and a "git" type, to present more efficient module
      access to module-aware go but still present a Git repo to the old
      "go get".
      
      Fixes #24751.
      Fixes #25069.
      
      Change-Id: I378955613a0d63834d4f50f121f4db7e4d87dc0a
      Reviewed-on: https://go-review.googlesource.com/109340
      Run-TryBot: Russ Cox <rsc@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: 's avatarBryan C. Mills <bcmills@google.com>
      d4e21288
    • teague's avatar
      net/http/httputil: reduced log verbosity in reverseproxy_test.go · b9ecac03
      teague authored
      For functions TestClonesRequestHeaders and TestReverseProxy_PanicBodyError,
      I made changes to update the log verbosity.
      
      Fixes #25634
      
      Change-Id: I2a0ef70a8191cfb1a0005949345be722fb4ab62e
      Reviewed-on: https://go-review.googlesource.com/115296Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      b9ecac03