From 4f7d4bcc0581f8157523f0a05a4a7665669a7572 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Thu, 28 Apr 2022 21:39:42 +0800 Subject: [PATCH] docs: replace all git.io links with their actual URLs --- core/commands/root.go | 2 +- core/coreapi/unixfs.go | 2 +- docs/implement-api-bindings.md | 12 ++++++------ fuse/node/mount_notsupp.go | 2 +- test/sharness/t0112-gateway-cors.sh | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/core/commands/root.go b/core/commands/root.go index ef17d2f70c7..bbdb019766c 100644 --- a/core/commands/root.go +++ b/core/commands/root.go @@ -152,7 +152,7 @@ var rootSubcommands = map[string]*cmds.Command{ "swarm": SwarmCmd, "tar": TarCmd, "file": unixfs.UnixFSCmd, - "update": ExternalBinary("Please see https://git.io/fjylH for installation instructions."), + "update": ExternalBinary("Please see https://github.com/ipfs/ipfs-update/blob/master/README.md#install for installation instructions."), "urlstore": urlStoreCmd, "version": VersionCmd, "shutdown": daemonShutdownCmd, diff --git a/core/coreapi/unixfs.go b/core/coreapi/unixfs.go index 5d3d7e80e30..da1202f60cb 100644 --- a/core/coreapi/unixfs.go +++ b/core/coreapi/unixfs.go @@ -96,7 +96,7 @@ func (api *UnixfsAPI) Add(ctx context.Context, files files.Node, opts ...options //} if settings.NoCopy && !(cfg.Experimental.FilestoreEnabled || cfg.Experimental.UrlstoreEnabled) { - return nil, fmt.Errorf("either the filestore or the urlstore must be enabled to use nocopy, see: https://git.io/vNItf") + return nil, fmt.Errorf("either the filestore or the urlstore must be enabled to use nocopy, see: https://github.com/ipfs/go-ipfs/blob/master/docs/experimental-features.md#ipfs-filestore") } addblockstore := api.blockstore diff --git a/docs/implement-api-bindings.md b/docs/implement-api-bindings.md index 364f3265e2e..c7bf9bdf0df 100644 --- a/docs/implement-api-bindings.md +++ b/docs/implement-api-bindings.md @@ -63,7 +63,7 @@ In HTTP, our API layering uses a REST-like mapping, where: There is a "standard IPFS API" which is currently defined as "all the commands exposed by the go-ipfs implementation". There are auto-generated [API Docs](https://ipfs.io/docs/api/). -You can Also see [a listing here](https://git.io/v5KG1), or get a list of +You can Also see [a listing here](https://github.com/ipfs/go-ipfs/blob/94b832df861728c65e912935641d08880c341e0a/core/commands/root.go#L96-L130), or get a list of commands by running `ipfs commands` locally. ## Implementing bindings for the HTTP API @@ -80,8 +80,8 @@ To date, we have two different HTTP API clients: - [js-ipfs-api](https://github.com/ipfs/js-ipfs-api) - simple javascript wrapper -- best to look at -- [go-ipfs/commands/http](https://git.io/v5KnB) - - generalized transport based on the [command definitions](https://git.io/v5KnE) +- [go-ipfs/commands/http](https://github.com/ipfs/go-ipfs/tree/916f987de2c35db71815b54bbb9a0a71df829838/commands/http) - + generalized transport based on the [command definitions](https://github.com/ipfs/go-ipfs/tree/916f987de2c35db71815b54bbb9a0a71df829838/core/commands) The Go implementation is good to answer harder questions, like how is multipart handled, or what headers should be set in edge conditions. But the javascript @@ -90,12 +90,12 @@ implementation is very concise, and easy to follow. #### Anatomy of node-ipfs-api Currently, node-ipfs-api has three main files -- [src/index.js](https://git.io/v5Kn2) defines the functions clients of the API +- [src/index.js](https://github.com/ipfs-inactive/js-ipfs-http-client/blob/66d1462bd02181d46e8baf4cd9d476b213426ad8/src/index.js) defines the functions clients of the API module will use. uses `RequestAPI`, and translates function call parameters to the API almost directly. -- [src/get-files-stream.js](https://git.io/v5Knr) implements the hardest part: +- [src/get-files-stream.js](https://github.com/ipfs-inactive/js-ipfs-http-client/blob/66d1462bd02181d46e8baf4cd9d476b213426ad8/src/get-files-stream.js) implements the hardest part: file streaming. This one uses multipart. -- [src/request-api.js](https://git.io/v5KnP) generic function call to perform +- [src/request-api.js](https://github.com/ipfs-inactive/js-ipfs-http-client/blob/66d1462bd02181d46e8baf4cd9d476b213426ad8/src/request-api.js) generic function call to perform the actual HTTP requests ## Note on multipart + inspecting requests diff --git a/fuse/node/mount_notsupp.go b/fuse/node/mount_notsupp.go index 929cdf7df90..c1cd625a1e2 100644 --- a/fuse/node/mount_notsupp.go +++ b/fuse/node/mount_notsupp.go @@ -9,5 +9,5 @@ import ( ) func Mount(node *core.IpfsNode, fsdir, nsdir string) error { - return errors.New("FUSE not supported on OpenBSD or NetBSD. See #5334 (https://git.io/fjMuC).") + return errors.New("FUSE not supported on OpenBSD or NetBSD. See #5334 (https://github.com/ipfs/go-ipfs/issues/5334).") } diff --git a/test/sharness/t0112-gateway-cors.sh b/test/sharness/t0112-gateway-cors.sh index 9670b7ffa16..cebb4e05aab 100755 --- a/test/sharness/t0112-gateway-cors.sh +++ b/test/sharness/t0112-gateway-cors.sh @@ -77,8 +77,8 @@ test_expect_success "GET to API succeeds" ' curl -svX GET "http://127.0.0.1:$GWAY_PORT/api/v0/cat?arg=$thash" >/dev/null 2>curl_output ' # GET Response from the API should NOT contain CORS headers -# Blacklisting: https://git.io/vzaj2 -# Rationale: https://git.io/vzajX +# Blacklisting: https://github.com/ipfs/go-ipfs/blob/5d9ee59908099df3f7e85679f7384c98d4ac8111/commands/http/handler.go#L71-L82 +# Rationale: https://github.com/ipfs/go-ipfs/pull/1529#issuecomment-125702347 test_expect_success "OPTIONS response for API looks good" ' grep -q "Access-Control-Allow-" curl_output && false || true '