Граф коммитов

9 Коммитов

Автор SHA1 Сообщение Дата
cui fliter 840b3808d8 all: replace io/ioutil with io and os package
For #45557

Change-Id: Icd0ff87bf46592e89cd4c88754cf07c3b0c300e6
GitHub-Last-Rev: f13b442112
GitHub-Pull-Request: golang/exp#43
Reviewed-on: https://go-review.googlesource.com/c/exp/+/430795
Run-TryBot: Jenny Rakoczy <jenny@golang.org>
Reviewed-by: Jenny Rakoczy <jenny@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Meng Zhuo <mzh@golangcn.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Meng Zhuo <mzh@golangcn.org>
Auto-Submit: Jenny Rakoczy <jenny@golang.org>
2022-09-15 21:06:09 +00:00
Russ Cox bcd21879b8 all: gofmt
Gofmt to update doc comments to the new formatting.

For golang/go#51082.

Change-Id: Iac828c845b6d7ae0eab93fcf007f3ef8e16c8ed7
Reviewed-on: https://go-review.googlesource.com/c/exp/+/399614
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
2022-04-14 15:34:11 +00:00
cuishuang a2e15db56b exp: fix some typos
Change-Id: If23d54917054f5ab67bff383c045e425f51e7e02
GitHub-Last-Rev: 1393b77ba2
GitHub-Pull-Request: golang/exp#28
Reviewed-on: https://go-review.googlesource.com/c/exp/+/389596
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Tobias Klauser <tobias.klauser@gmail.com>
2022-03-07 08:09:10 +00:00
Russ Cox efd6b22b25 sumdb/internal/tkv/tkvtest: add tester and in-memory implementation
This is part of a Go checksum database implementation.
Eventually the code will live outside golang.org/x/exp.

Although the expected implementation of tkv.Storage
is a real database or key-value store, it speeds testing
considerably to avoid needing a full-blown storage system
for writing tests. This CL adds tkvtest.Mem, a trivial in-memory
implementation of tkv.Storage, for testing.

This CL also adds a preliminary tester for tkv.Storage
implementations. It is used here for testing tkvtest.Mem
but can be used for testing other implementations as well.

Change-Id: Ib70bc25a7b519fa4b685f6ce4c91b3ed04e0aa30
Reviewed-on: https://go-review.googlesource.com/c/exp/+/161663
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2019-05-10 13:29:18 +00:00
Russ Cox bd971048da sumdb/internal/tkv: interface for transaction key-value store
This is the underlying storage interface for a Go checksum database.
Eventually the code will live outside golang.org/x/exp.

The interface is designed to be implementable by a variety
of storage options, including Google Cloud Spanner and a
single-file key-value database.

Change-Id: I7bd33711eec94b30196f998fb1003ef91e7e8d55
Reviewed-on: https://go-review.googlesource.com/c/exp/+/161662
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2019-05-10 13:29:11 +00:00
Filippo Valsorda 475c5042d3 sumdb: restore Go 1.12 support
Change-Id: I4711da945699bbe9416a804f6ec28ca95eb4bb7c
Reviewed-on: https://go-review.googlesource.com/c/exp/+/174397
Run-TryBot: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-04-29 18:36:10 +00:00
Russ Cox 956cc17577 sumdb/internal/sumweb: simplify code, clarify comments
Followup work from CL 172964 review comments.
(That CL was in a different directory and is too hard to get back to.)

- Simplify to one cache for Conn.ReadTile.
- Replace Client.GetURL with Client.ReadRemote,
  which takes only a path, not a full URL.
  It works better for the client to take care of URL mapping.
- Rename FindKey to Lookup throughout (matches URL).
- Apply !-decoding in Handler.

Change-Id: Ib004ebb1b608d9ee2f8bdf768628acdd5b985158
Reviewed-on: https://go-review.googlesource.com/c/exp/+/173945
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2019-04-26 19:03:05 +00:00
Russ Cox bd9ab2f67d sumdb/internal/sumweb: add test server implementation
This CL adds a TestServer, which is useful for tests that need a
working HTTP sumdb server. It takes care of serving records,
tiles, signed hashes, and so on, given only a key and a function
to fetch new go.sum entries.

Change-Id: I137e0ca570e5110bccf3ea84b9bd8ffbb5d280be
Reviewed-on: https://go-review.googlesource.com/c/exp/+/173944
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-04-26 19:03:04 +00:00
Russ Cox 7da06db65d sumdb: mv notary sumdb
We are changing the name "Go notary" to "Go checksum database"
to avoid confusion with the CNCF Notary.

This CL renames the x/exp/notary tree to x/exp/sumdb.

For golang/go#30835.

Change-Id: I348d31050e760a08335882b640edca4f89d86920
Reviewed-on: https://go-review.googlesource.com/c/exp/+/173737
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-04-26 00:44:29 +00:00