refactor(as-a-library): remove unused context
createTempRepo doesn't use context
lasiar committed
Jul 17, 2021 at 03:37 UTC
da0afea33b3a431ea6bf7154ec6a9f783d38aefb
1 file changed
+2
-2
docs/examples/go-ipfs-as-a-library/main.go
+2
-2
@@ -45,7 +45,7 @@ func setupPlugins(externalPluginsPath string) error {
45
return nil
46
}
47
48
-func createTempRepo(ctx context.Context) (string, error) {
48
+func createTempRepo() (string, error) {
49
repoPath, err := ioutil.TempDir("", "ipfs-shell")
50
if err != nil {
51
return "", fmt.Errorf("failed to get temp dir: %s", err)
@@ -117,7 +117,7 @@ func spawnEphemeral(ctx context.Context) (icore.CoreAPI, error) {
117
}
118
119
// Create a Temporary Repo
120
- repoPath, err := createTempRepo(ctx)
120
+ repoPath, err := createTempRepo()
121
if err != nil {
122
return nil, fmt.Errorf("failed to create temp repo: %s", err)
123
}