mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 18:37:45 +08:00
Capitalized NOTE, first letter of following word
License: MIT Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
This commit is contained in:
parent
fed6212d51
commit
f60ae0a1b9
2
Godeps/_workspace/src/bazil.org/fuse/fs/serve.go
generated
vendored
2
Godeps/_workspace/src/bazil.org/fuse/fs/serve.go
generated
vendored
@ -774,7 +774,7 @@ func (c *serveConn) serve(r fuse.Request) {
|
||||
|
||||
switch r := r.(type) {
|
||||
default:
|
||||
// Note: To FUSE, ENOSYS means "this server never implements this request."
|
||||
// NOTE: To FUSE, ENOSYS means "this server never implements this request."
|
||||
// It would be inappropriate to return ENOSYS for other operations in this
|
||||
// switch that might only be unavailable in some contexts, not all.
|
||||
done(fuse.ENOSYS)
|
||||
|
||||
4
Godeps/_workspace/src/github.com/cenkalti/backoff/exponential.go
generated
vendored
4
Godeps/_workspace/src/github.com/cenkalti/backoff/exponential.go
generated
vendored
@ -19,13 +19,13 @@ percentage below and above the retry interval. For example, using 2 seconds as t
|
||||
interval and 0.5 as the randomization factor, the actual back off period used in the next retry
|
||||
attempt will be between 1 and 3 seconds.
|
||||
|
||||
Note: max_interval caps the retry_interval and not the randomized_interval.
|
||||
NOTE: max_interval caps the retry_interval and not the randomized_interval.
|
||||
|
||||
If the time elapsed since an ExponentialBackOff instance is created goes past the
|
||||
max_elapsed_time then the method NextBackOff() starts returning backoff.Stop.
|
||||
The elapsed time can be reset by calling Reset().
|
||||
|
||||
Example: The default retry_interval is .5 seconds, default randomization_factor is 0.5, default
|
||||
EXAMPLE: The default retry_interval is .5 seconds, default randomization_factor is 0.5, default
|
||||
multiplier is 1.5 and the default max_interval is 1 minute. For 10 tries the sequence will be
|
||||
(values in seconds) and assuming we go over the max_elapsed_time on the 10th try:
|
||||
|
||||
|
||||
2
Godeps/_workspace/src/github.com/cheggaaa/pb/pb.go
generated
vendored
2
Godeps/_workspace/src/github.com/cheggaaa/pb/pb.go
generated
vendored
@ -145,7 +145,7 @@ func (pb *ProgressBar) Postfix(postfix string) *ProgressBar {
|
||||
}
|
||||
|
||||
// Set custom format for bar
|
||||
// Example: bar.Format("[=>_]")
|
||||
// EXAMPLE: bar.Format("[=>_]")
|
||||
func (pb *ProgressBar) Format(format string) *ProgressBar {
|
||||
formatEntries := strings.Split(format, "")
|
||||
if len(formatEntries) == 5 {
|
||||
|
||||
4
Godeps/_workspace/src/github.com/codegangsta/cli/app.go
generated
vendored
4
Godeps/_workspace/src/github.com/codegangsta/cli/app.go
generated
vendored
@ -56,9 +56,9 @@ type App struct {
|
||||
Authors []Author
|
||||
// Copyright of the binary if any
|
||||
Copyright string
|
||||
// Name of Author (Note: Use App.Authors, this is deprecated)
|
||||
// Name of Author (NOTE: Use App.Authors, this is deprecated)
|
||||
Author string
|
||||
// Email of Author (Note: Use App.Authors, this is deprecated)
|
||||
// Email of Author (NOTE: Use App.Authors, this is deprecated)
|
||||
Email string
|
||||
// Writer writer to write output to
|
||||
Writer io.Writer
|
||||
|
||||
2
Godeps/_workspace/src/github.com/ipfs/go-datastore/leveldb/datastore.go
generated
vendored
2
Godeps/_workspace/src/github.com/ipfs/go-datastore/leveldb/datastore.go
generated
vendored
@ -33,7 +33,7 @@ func NewDatastore(path string, opts *Options) (*datastore, error) {
|
||||
|
||||
// Returns ErrInvalidType if value is not of type []byte.
|
||||
//
|
||||
// Note: using sync = false.
|
||||
// NOTE: Using sync = false.
|
||||
// see http://godoc.org/github.com/syndtr/goleveldb/leveldb/opt#WriteOptions
|
||||
func (d *datastore) Put(key ds.Key, value interface{}) (err error) {
|
||||
val, ok := value.([]byte)
|
||||
|
||||
2
Godeps/_workspace/src/github.com/ipfs/go-datastore/namespace/namespace.go
generated
vendored
2
Godeps/_workspace/src/github.com/ipfs/go-datastore/namespace/namespace.go
generated
vendored
@ -12,7 +12,7 @@ import (
|
||||
// PrefixTransform constructs a KeyTransform with a pair of functions that
|
||||
// add or remove the given prefix key.
|
||||
//
|
||||
// Warning: will panic if prefix not found when it should be there. This is
|
||||
// Warning: Will panic if prefix not found when it should be there. This is
|
||||
// to avoid insidious data inconsistency errors.
|
||||
func PrefixTransform(prefix ds.Key) ktds.KeyTransform {
|
||||
return &ktds.Pair{
|
||||
|
||||
2
Godeps/_workspace/src/github.com/rs/cors/cors.go
generated
vendored
2
Godeps/_workspace/src/github.com/rs/cors/cors.go
generated
vendored
@ -93,7 +93,7 @@ func New(options Options) *Cors {
|
||||
}
|
||||
|
||||
// Normalize options
|
||||
// Note: for origins and methods matching, the spec requires a case-sensitive matching.
|
||||
// NOTE: For origins and methods matching, the spec requires a case-sensitive matching.
|
||||
// As it may error prone, we chose to ignore the spec here.
|
||||
|
||||
// Allowed Origins
|
||||
|
||||
2
Godeps/_workspace/src/github.com/syndtr/gosnappy/snappy/snappy_test.go
generated
vendored
2
Godeps/_workspace/src/github.com/syndtr/gosnappy/snappy/snappy_test.go
generated
vendored
@ -241,7 +241,7 @@ func expand(src []byte, n int) []byte {
|
||||
}
|
||||
|
||||
func benchWords(b *testing.B, n int, decode bool) {
|
||||
// Note: the file is OS-language dependent so the resulting values are not
|
||||
// NOTE: The file is OS-language dependent so the resulting values are not
|
||||
// directly comparable for non-US-English OS installations.
|
||||
data := expand(readFile(b, "/usr/share/dict/words"), n)
|
||||
if decode {
|
||||
|
||||
2
Godeps/_workspace/src/gopkg.in/fsnotify.v1/open_mode_darwin.go
generated
vendored
2
Godeps/_workspace/src/gopkg.in/fsnotify.v1/open_mode_darwin.go
generated
vendored
@ -8,5 +8,5 @@ package fsnotify
|
||||
|
||||
import "syscall"
|
||||
|
||||
// note: this constant is not defined on BSD
|
||||
// note: This constant is not defined on BSD
|
||||
const openMode = syscall.O_EVTONLY
|
||||
|
||||
@ -28,7 +28,7 @@ var FilesCmd = &cmds.Command{
|
||||
ShortDescription: `
|
||||
Files is an API for manipulating IPFS objects as if they were a unix filesystem.
|
||||
|
||||
Note:
|
||||
NOTE:
|
||||
Most of the subcommands of 'ipfs files' accept the '--flush' flag. It defaults to
|
||||
true. Use caution when setting this flag to false. It will improve performance
|
||||
for large numbers of file operations, but it does so at the cost of consistency
|
||||
@ -499,12 +499,12 @@ If the '--flush' option is set to false, changes will not be propogated to the
|
||||
merkledag root. This can make operations much faster when doing a large number
|
||||
of writes to a deeper directory structure.
|
||||
|
||||
Example:
|
||||
EXAMPLE:
|
||||
|
||||
echo "hello world" | ipfs files write --create /myfs/a/b/file
|
||||
echo "hello world" | ipfs files write --truncate /myfs/a/b/file
|
||||
|
||||
Warning:
|
||||
WARNING:
|
||||
|
||||
Usage of the '--flush=false' option does not guarantee data durability until
|
||||
the tree has been flushed. This can be accomplished by running 'ipfs files stat'
|
||||
@ -616,7 +616,7 @@ var FilesMkdirCmd = &cmds.Command{
|
||||
ShortDescription: `
|
||||
Create the directory if it does not already exist.
|
||||
|
||||
Note: All paths must be absolute.
|
||||
NOTE: All paths must be absolute.
|
||||
|
||||
Examples:
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ Example:
|
||||
|
||||
$ echo "hello" | ipfs object patch $HASH append-data
|
||||
|
||||
Note: This does not append data to a file - it modifies the actual raw
|
||||
NOTE: This does not append data to a file - it modifies the actual raw
|
||||
data within an object. Objects have a max size of 1MB and objects larger than
|
||||
the limit will not be respected by the network.
|
||||
`,
|
||||
|
||||
@ -40,7 +40,7 @@ with the following format:
|
||||
|
||||
<link base58 hash>
|
||||
|
||||
Note: List all references recursively by using the flag '-r'.
|
||||
NOTE: List all references recursively by using the flag '-r'.
|
||||
`,
|
||||
},
|
||||
Subcommands: map[string]*cmds.Command{
|
||||
|
||||
@ -323,7 +323,7 @@ func (n *IpfsNode) teardown() error {
|
||||
// regardless of which constructor was used to add them to the node.
|
||||
var closers []io.Closer
|
||||
|
||||
// NOTE: the order that objects are added(closed) matters, if an object
|
||||
// NOTE: The order that objects are added(closed) matters, if an object
|
||||
// needs to use another during its shutdown/cleanup process, it should be
|
||||
// closed before that other object
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@ You may also have to change `/dev/fuse`:
|
||||
sudo chown <username>:<groupname> /dev/fuse
|
||||
```
|
||||
|
||||
Note: `<groupname>` will usually be `fuse`. Typically, you add the authorized users to the `fuse` group:
|
||||
NOTE: `<groupname>` will usually be `fuse`. Typically, you add the authorized users to the `fuse` group:
|
||||
|
||||
```sh
|
||||
sudo usermod -a -G fuse <username>
|
||||
|
||||
@ -31,7 +31,7 @@ In the commandline, IPFS uses a traditional flag and arg-based mapping, where:
|
||||
- the rest are positional arguments - e.g. `ipfs object patch <hash1> add-link foo <hash2>`
|
||||
- files are specified by filename, or through stdin
|
||||
|
||||
(NOTE: when go-ipfs runs the daemon, the CLI API is actually converted to HTTP calls. otherwise, they execute in the same process)
|
||||
(NOTE: When go-ipfs runs the daemon, the CLI API is actually converted to HTTP calls. otherwise, they execute in the same process)
|
||||
|
||||
### HTTP API Transport
|
||||
|
||||
@ -47,7 +47,7 @@ In HTTP, our API layering uses a REST-like mapping, where:
|
||||
|
||||
There is a "standard IPFS API" with a set of commands, which we are documenting clearly soon. But this is not yet extracted into its own document. Perhaps -- as part of this API Bindings effort -- we can document it all. It is currently defined as "all the commands exposed by the go-ipfs implementation". You can see [a listing here](https://github.com/ipfs/go-ipfs/blob/916f987de2c35db71815b54bbb9a0a71df829838/core/commands/root.go#L82-L111), or by running `ipfs commands` locally. **The good news is: we should be able to easily write a program that outputs a markdown API specification!**
|
||||
|
||||
(Note: the go-ipfs [commands library](https://github.com/ipfs/go-ipfs/tree/916f987de2c35db71815b54bbb9a0a71df829838/commands) also makes sure to keep the CLI and the HTTP API exactly in sync.)
|
||||
(NOTE: The go-ipfs [commands library](https://github.com/ipfs/go-ipfs/tree/916f987de2c35db71815b54bbb9a0a71df829838/commands) also makes sure to keep the CLI and the HTTP API exactly in sync.)
|
||||
|
||||
## Implementing bindings for the HTTP API
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ var fuseVersionPkg = "github.com/jbenet/go-fuse-version/fuse-version"
|
||||
var errStrFuseRequired = `OSXFUSE not found.
|
||||
|
||||
OSXFUSE is required to mount, please install it.
|
||||
Note: version 2.7.2 or higher required; prior versions are known to kernel panic!
|
||||
NOTE: Version 2.7.2 or higher required; prior versions are known to kernel panic!
|
||||
It is recommended you install it from the OSXFUSE website:
|
||||
|
||||
http://osxfuse.github.io/
|
||||
|
||||
@ -165,7 +165,7 @@ func (n *Node) GetLinkedNode(ctx context.Context, ds DAGService, name string) (*
|
||||
}
|
||||
|
||||
// Copy returns a copy of the node.
|
||||
// NOTE: does not make copies of Node objects in the links.
|
||||
// NOTE: Does not make copies of Node objects in the links.
|
||||
func (n *Node) Copy() *Node {
|
||||
nnode := new(Node)
|
||||
if len(n.Data) > 0 {
|
||||
@ -234,7 +234,7 @@ func (n *Node) Stat() (*NodeStat, error) {
|
||||
|
||||
// Multihash hashes the encoded data of this node.
|
||||
func (n *Node) Multihash() (mh.Multihash, error) {
|
||||
// Note: EncodeProtobuf generates the hash and puts it in n.cached.
|
||||
// NOTE: EncodeProtobuf generates the hash and puts it in n.cached.
|
||||
_, err := n.EncodeProtobuf(false)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@ -213,7 +213,7 @@ func TestPinRecursiveFail(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
// Note: this isnt a time based test, we expect the pin to fail
|
||||
// NOTE: This isnt a time based test, we expect the pin to fail
|
||||
mctx, _ := context.WithTimeout(ctx, time.Millisecond)
|
||||
err = p.Pin(mctx, a, true)
|
||||
if err == nil {
|
||||
|
||||
@ -11,7 +11,7 @@ import (
|
||||
// for ipfs. they are nodes run by the ipfs team. docs on these later.
|
||||
// As with all p2p networks, bootstrap is an important security concern.
|
||||
//
|
||||
// Note: this is here -- and not inside cmd/ipfs/init.go -- because of an
|
||||
// NOTE: This is here -- and not inside cmd/ipfs/init.go -- because of an
|
||||
// import dependency issue. TODO: move this into a config/default/ package.
|
||||
var DefaultBootstrapAddresses = []string{
|
||||
"/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ", // mars.i.ipfs.io
|
||||
|
||||
@ -29,7 +29,7 @@ func Init(out io.Writer, nBitsForKeypair int) (*Config, error) {
|
||||
conf := &Config{
|
||||
|
||||
// setup the node's default addresses.
|
||||
// Note: two swarm listen addrs, one tcp, one utp.
|
||||
// NOTE: two swarm listen addrs, one tcp, one utp.
|
||||
Addresses: Addresses{
|
||||
Swarm: []string{
|
||||
"/ip4/0.0.0.0/tcp/4001",
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# go-ipfs Q2 roadmap
|
||||
Note: no specific order is implied in this list
|
||||
NOTE: No specific order is implied in this list.
|
||||
|
||||
- [ ] fix random test failures
|
||||
- check issues for label 'test_failure'
|
||||
|
||||
@ -154,7 +154,7 @@ var errInvalidRecord = errors.New("received invalid record")
|
||||
|
||||
// getValueOrPeers queries a particular peer p for the value for
|
||||
// key. It returns either the value or a list of closer peers.
|
||||
// NOTE: it will update the dht's peerstore with any new addresses
|
||||
// NOTE: It will update the dht's peerstore with any new addresses
|
||||
// it finds for the given peer.
|
||||
func (dht *IpfsDHT) getValueOrPeers(ctx context.Context, p peer.ID,
|
||||
key key.Key) (*pb.Record, []peer.PeerInfo, error) {
|
||||
|
||||
@ -127,7 +127,7 @@ func (dht *IpfsDHT) checkLocalDatastore(k key.Key) (*pb.Record, error) {
|
||||
recordIsBad = true
|
||||
}
|
||||
|
||||
// NOTE: we do not verify the record here beyond checking these timestamps.
|
||||
// NOTE: We do not verify the record here beyond checking these timestamps.
|
||||
// we put the burden of checking the records on the requester as checking a record
|
||||
// may be computationally expensive
|
||||
|
||||
|
||||
@ -283,7 +283,7 @@ func (dht *IpfsDHT) findProvidersAsyncRoutine(ctx context.Context, key key.Key,
|
||||
ps := pset.NewLimited(count)
|
||||
provs := dht.providers.GetProviders(ctx, key)
|
||||
for _, p := range provs {
|
||||
// NOTE: assuming that this list of peers is unique
|
||||
// NOTE: Assuming that this list of peers is unique
|
||||
if ps.TryAdd(p) {
|
||||
select {
|
||||
case peerOut <- dht.peerstore.PeerInfo(p):
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
# MIT Licensed; see the LICENSE file in this repository.
|
||||
#
|
||||
|
||||
# NOTE: run with TEST_VERBOSE=1 for verbose sharness tests.
|
||||
# NOTE: Run with TEST_VERBOSE=1 for verbose sharness tests.
|
||||
|
||||
T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh))
|
||||
BINS = bin/random bin/multihash bin/ipfs bin/pollEndpoint \
|
||||
|
||||
@ -13,7 +13,7 @@ test_init_ipfs
|
||||
#############################
|
||||
# Test without daemon running
|
||||
#############################
|
||||
# Note: if api file isn't present we can assume the daemon isn't running
|
||||
# NOTE: if api file isn't present we can assume the daemon isn't running
|
||||
|
||||
# Try with all lock files present: repo.lock, api, and datastore/LOCK with
|
||||
# repo.lock and datastore/LOCK being empty
|
||||
|
||||
2
thirdparty/loggables/loggables.go
vendored
2
thirdparty/loggables/loggables.go
vendored
@ -2,7 +2,7 @@
|
||||
// commonplace/stdlib objects. This is boilerplate code that shouldn't change
|
||||
// much, and not sprinkled all over the place (i.e. gather it here).
|
||||
//
|
||||
// Note: it may make sense to put all stdlib Loggable functions in the eventlog
|
||||
// NOTE: it may make sense to put all stdlib Loggable functions in the eventlog
|
||||
// package. Putting it here for now in case we don't want to pollute it.
|
||||
package loggables
|
||||
|
||||
|
||||
2
thirdparty/testutil/ci/travis/travis.go
vendored
2
thirdparty/testutil/ci/travis/travis.go
vendored
@ -36,7 +36,7 @@ const (
|
||||
// CI=true
|
||||
// TRAVIS=true
|
||||
//
|
||||
// Note: cannot just check CI.
|
||||
// NOTE: cannot just check CI.
|
||||
func IsRunning() bool {
|
||||
return Env(VarCI) == "true" && Env(VarTravis) == "true"
|
||||
}
|
||||
|
||||
2
thirdparty/testutil/gen.go
vendored
2
thirdparty/testutil/gen.go
vendored
@ -61,7 +61,7 @@ func RandPeerIDFatal(t testing.TB) peer.ID {
|
||||
// RandLocalTCPAddress returns a random multiaddr. it suppresses errors
|
||||
// for nice composability-- do check the address isn't nil.
|
||||
//
|
||||
// Note: for real network tests, use ZeroLocalTCPAddress so the kernel
|
||||
// NOTE: for real network tests, use ZeroLocalTCPAddress so the kernel
|
||||
// assigns an unused TCP port. otherwise you may get clashes. This
|
||||
// function remains here so that p2p/net/mock (which does not touch the
|
||||
// real network) can assign different addresses to peers.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user