Categorize NewestSha example under Db interface.
It seems the godoc example extraction does not recognize the same syntax used for functions with receivers when working with interfaces. So, instead, categorize the example on the interface.
This commit is contained in:
parent
05ff5bd8ec
commit
4422b14f63
2 changed files with 5 additions and 5 deletions
|
@ -36,7 +36,7 @@ $ go get github.com/conformal/btcdb
|
|||
Demonstrates creating a new database and inserting the genesis block into it.
|
||||
|
||||
* [NewestSha Example]
|
||||
(http://godoc.org/github.com/conformal/btcdb#example-CreateDB)
|
||||
(http://godoc.org/github.com/conformal/btcdb#example-Db)
|
||||
Demonstrates querying the database for the most recent best block height and
|
||||
hash.
|
||||
|
||||
|
|
|
@ -49,8 +49,8 @@ func ExampleCreateDB() {
|
|||
// New height: 0
|
||||
}
|
||||
|
||||
// exampleLoadDb is used in the example to elide the setup code.
|
||||
func exampleLoadDb() (btcdb.Db, error) {
|
||||
// exampleLoadDB is used in the example to elide the setup code.
|
||||
func exampleLoadDB() (btcdb.Db, error) {
|
||||
db, err := btcdb.CreateDB("memdb")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -68,11 +68,11 @@ func exampleLoadDb() (btcdb.Db, error) {
|
|||
|
||||
// This example demonstrates querying the database for the most recent best
|
||||
// block height and hash.
|
||||
func ExampleDb_NewestSha() {
|
||||
func ExampleDb() {
|
||||
// Load a database for the purposes of this example and schedule it to
|
||||
// be closed on exit. See the CreateDB example for more details on what
|
||||
// this step is doing.
|
||||
db, err := exampleLoadDb()
|
||||
db, err := exampleLoadDB()
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
|
|
Loading…
Add table
Reference in a new issue