From 319f006386e5649816e84ae06075670ab5528803 Mon Sep 17 00:00:00 2001 From: Rob Brackett Date: Tue, 12 Jun 2018 15:56:15 -0700 Subject: [PATCH] Add package overview comments to coreapi License: MIT Signed-off-by: Rob Brackett --- core/coreapi/coreapi.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/core/coreapi/coreapi.go b/core/coreapi/coreapi.go index 7632c1acef3..36c9ee740a7 100644 --- a/core/coreapi/coreapi.go +++ b/core/coreapi/coreapi.go @@ -1,3 +1,16 @@ +/* +Package coreapi provides direct access to the core commands in IPFS. If you are +embedding IPFS directly in your Go program, this package is the public +interface you should use to read and write files or otherwise control IPFS. + +If you are running IPFS as a separate process, you should use `go-ipfs-api` to +work with it via HTTP. As we finalize the interfaces here, `go-ipfs-api` will +transparently adopt them so you can use the same code with either package. + +**NOTE: this package is experimental.** `go-ipfs` has mainly been developed +as a standalone application and library-style use of this package is still new. +Interfaces here aren't yet completely stable. +*/ package coreapi import ( @@ -49,7 +62,7 @@ func (api *CoreAPI) Key() coreiface.KeyAPI { return (*KeyAPI)(api) } -//Object returns the ObjectAPI interface implementation backed by the go-ipfs node +// Object returns the ObjectAPI interface implementation backed by the go-ipfs node func (api *CoreAPI) Object() coreiface.ObjectAPI { return (*ObjectAPI)(api) }