<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/database/sql/convert_test.go, branch json-isValidNumber</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=json-isValidNumber</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=json-isValidNumber'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2021-12-13T18:45:54Z</updated>
<entry>
<title>all: gofmt -w -r 'interface{} -&gt; any' src</title>
<updated>2021-12-13T18:45:54Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2021-12-01T17:15:45Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=2580d0e08d5e9f979b943758d3c49877fb2324cb'/>
<id>urn:sha1:2580d0e08d5e9f979b943758d3c49877fb2324cb</id>
<content type='text'>
And then revert the bootstrap cmd directories and certain testdata.
And adjust tests as needed.

Not reverting the changes in std that are bootstrapped,
because some of those changes would appear in API docs,
and we want to use any consistently.
Instead, rewrite 'any' to 'interface{}' in cmd/dist for those directories
when preparing the bootstrap copy.

A few files changed as a result of running gofmt -w
not because of interface{} -&gt; any but because they
hadn't been updated for the new //go:build lines.

Fixes #49884.

Change-Id: Ie8045cba995f65bd79c694ec77a1b3d1fe01bb09
Reviewed-on: https://go-review.googlesource.com/c/go/+/368254
Trust: Russ Cox &lt;rsc@golang.org&gt;
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-by: Robert Griesemer &lt;gri@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>all: remove some unused code</title>
<updated>2021-09-14T00:49:39Z</updated>
<author>
<name>Alexander Melentyev</name>
<email>alexander@melentyev.org</email>
</author>
<published>2021-09-11T06:59:17Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=4a4221e8187189adcc6463d2d96fe2e8da290132'/>
<id>urn:sha1:4a4221e8187189adcc6463d2d96fe2e8da290132</id>
<content type='text'>
Change-Id: I519b8021fa79dccc5c0ee79134547491116fc4cc
GitHub-Last-Rev: 48869f5434c1255d33c3a14714747509235c94df
GitHub-Pull-Request: golang/go#48071
Reviewed-on: https://go-review.googlesource.com/c/go/+/346231
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Trust: Keith Randall &lt;khr@golang.org&gt;
</content>
</entry>
<entry>
<title>all: fix typos</title>
<updated>2019-09-08T17:28:20Z</updated>
<author>
<name>Ainar Garipov</name>
<email>gugl.zadolbal@gmail.com</email>
</author>
<published>2019-09-08T16:36:13Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=0efbd1015774a2d894138519f1efcf7704bb2d95'/>
<id>urn:sha1:0efbd1015774a2d894138519f1efcf7704bb2d95</id>
<content type='text'>
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 &lt;gri@golang.org&gt;
</content>
</entry>
<entry>
<title>database/sql: add support for decimal interface</title>
<updated>2019-06-13T16:59:01Z</updated>
<author>
<name>Daniel Theophanes</name>
<email>kardianos@gmail.com</email>
</author>
<published>2019-04-26T19:49:23Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=683ffe09f66f0834baf039deeabe16eec6b09daa'/>
<id>urn:sha1:683ffe09f66f0834baf039deeabe16eec6b09daa</id>
<content type='text'>
Add support for scanning decimal types into values. If the dest
supports the decimal composer interface and the src supports
the decimal decomposer, set the value of the decimal when Scanning.

Add support for sending decimal decomposer interface values
as parameters.

For #30870

Change-Id: Ic5dbf9069df8d56405852b17542a9188d55c2947
Reviewed-on: https://go-review.googlesource.com/c/go/+/174181
Run-TryBot: Daniel Theophanes &lt;kardianos@gmail.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
</entry>
<entry>
<title>all: simplify code using "gofmt -s -w"</title>
<updated>2019-05-06T22:19:22Z</updated>
<author>
<name>Shulhan</name>
<email>m.shulhan@gmail.com</email>
</author>
<published>2019-03-09T04:36:37Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=ed7f323c8f4f6bc61a75146bf34f5b8f73063a17'/>
<id>urn:sha1:ed7f323c8f4f6bc61a75146bf34f5b8f73063a17</id>
<content type='text'>
Most changes are removing redundant declaration of type when direct
instantiating value of map or slice, e.g. []T{T{}} become []T{{}}.

Small changes are removing the high order of subslice if its value
is the length of slice itself, e.g. T[:len(T)] become T[:].

The following file is excluded due to incompatibility with go1.4,

- src/cmd/compile/internal/gc/ssa.go

Change-Id: Id3abb09401795ce1e6da591a89749cba8502fb26
Reviewed-on: https://go-review.googlesource.com/c/go/+/166437
Run-TryBot: Dave Cheney &lt;dave@cheney.net&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
</entry>
<entry>
<title>database/sql: fix TestConversions when count &gt; 1</title>
<updated>2018-01-25T03:39:24Z</updated>
<author>
<name>Daniel Theophanes</name>
<email>kardianos@gmail.com</email>
</author>
<published>2018-01-24T20:27:59Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=1b69d19a422830a5a2c043df36330f30b3df445e'/>
<id>urn:sha1:1b69d19a422830a5a2c043df36330f30b3df445e</id>
<content type='text'>
Provide a fresh conversion table for TestConversions as it gets
modified on each test.

Change-Id: I6e2240d0c3455451271a6879e994b82222c3d44c
Reviewed-on: https://go-review.googlesource.com/89595
Run-TryBot: Daniel Theophanes &lt;kardianos@gmail.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
</content>
</entry>
<entry>
<title>all: change github.com issue links to golang.org</title>
<updated>2017-11-04T04:13:41Z</updated>
<author>
<name>Leigh McCulloch</name>
<email>leighmcc@gmail.com</email>
</author>
<published>2017-11-03T05:48:43Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=8db19a496640db4c7c318007c82eaa5d65c85b93'/>
<id>urn:sha1:8db19a496640db4c7c318007c82eaa5d65c85b93</id>
<content type='text'>
The go repository contains a mix of github.com/golang/go/issues/xxxxx
and golang.org/issues/xxxxx URLs for references to issues in the issue
tracker. We should use one for consistency, and golang.org is preferred
in case the project moves the issue tracker in the future.

This reasoning is taken from a comment Sam Whited left on a CL I
recently opened: https://go-review.googlesource.com/c/go/+/73890.

In that CL I referenced an issue using its github.com URL, because other
tests in the file I was changing contained references to issues using
their github.com URL. Sam Whited left a comment on the CL stating I
should change it to the golang.org URL.

If new code is intended to reference issues via golang.org and not
github.com, existing code should be updated so that precedence exists
for contributors who are looking at the existing code as a guide for the
code they should write.

Change-Id: I3b9053fe38a1c56fc101a8b7fd7b8f310ba29724
Reviewed-on: https://go-review.googlesource.com/75673
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
</entry>
<entry>
<title>database/sql: ensure all driver interfaces are called under single lock</title>
<updated>2017-10-25T17:21:58Z</updated>
<author>
<name>Daniel Theophanes</name>
<email>kardianos@gmail.com</email>
</author>
<published>2017-10-17T22:59:56Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=1126d1483f0397648905fcd4590ae45352cabd69'/>
<id>urn:sha1:1126d1483f0397648905fcd4590ae45352cabd69</id>
<content type='text'>
Russ pointed out in a previous CL golang.org/cl/65731 that not only
was the locking incomplete, previous changes did not correctly
lock driver calls in other sections. After inspecting
driverConn, driverStmt, driverResult, Tx, and Rows structs
where driver interfaces are stored, I discovered a few more places
that failed to lock driver calls. The largest of these
was the parameter type converter "driverArgs".

driverArgs was typically called right before another call to the
driver in a locked region, so I made the entire driverArgs expect
a locked driver mutex and combined the region. This should not
be a problem because the connection is pulled out of the connection
pool either way so there shouldn't be contention.

Fixes #21117

Change-Id: I88d46f74dca25fb11a30f0bf8e79785a73133d23
Reviewed-on: https://go-review.googlesource.com/71433
Run-TryBot: Daniel Theophanes &lt;kardianos@gmail.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
</content>
</entry>
<entry>
<title>database/sql: convertAssign string and time.Time into RawBytes</title>
<updated>2017-10-01T16:41:57Z</updated>
<author>
<name>Cyrill Schumacher</name>
<email>cyrill@schumacher.fm</email>
</author>
<published>2017-09-28T08:23:12Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=3487c4e02199b68d71df1868326e1b0a872a89a2'/>
<id>urn:sha1:3487c4e02199b68d71df1868326e1b0a872a89a2</id>
<content type='text'>
A new switch case for converting the source string type into a
destination RawBytes type avoids the reflection based conversion.
Speed up from old ~61.7ns/op down to ~49ns/op.

A second new switch case allows to convert and assign a source time.Time
type into a destination sql.RawBytes type. This switch case appends
the time to the reset RawBytes slice. This allows the reuse of RawBytes
and avoids allocations.

Fixes #20746

Change-Id: Ib0563fd5c5c7cb6d9d0acaa1d9aa7b2927f1329c
Reviewed-on: https://go-review.googlesource.com/66830
Run-TryBot: Daniel Theophanes &lt;kardianos@gmail.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Daniel Theophanes &lt;kardianos@gmail.com&gt;
</content>
</entry>
<entry>
<title>database/sql: TestConversions add forgotten fields wantbytes and wantraw</title>
<updated>2017-09-27T20:42:07Z</updated>
<author>
<name>Cyrill Schumacher</name>
<email>cyrill@schumacher.fm</email>
</author>
<published>2017-09-27T18:37:02Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=70bcd2c54e8f26ee67372dffa56a86ae9701e843'/>
<id>urn:sha1:70bcd2c54e8f26ee67372dffa56a86ae9701e843</id>
<content type='text'>
The fields wantbytes and wantraw in the test struct `conversionTest` has
been forgotten to include in the TestConversions function.

Change-Id: I6dab69e76de3799a1bbf9fa09a15607e55172114
Reviewed-on: https://go-review.googlesource.com/66610
Reviewed-by: David Crawshaw &lt;crawshaw@golang.org&gt;
Reviewed-by: Daniel Theophanes &lt;kardianos@gmail.com&gt;
Run-TryBot: David Crawshaw &lt;crawshaw@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</content>
</entry>
</feed>
