MCPcopy
hub / github.com/etcd-io/bbolt / pageFunc

Function pageFunc

cmd/bbolt/command/command_page.go:47–63  ·  view source on GitHub ↗
(cmd *cobra.Command, cfg getPageOptions, dbPath string, pageIDs []uint64)

Source from the content-addressed store, hash-verified

45}
46
47func pageFunc(cmd *cobra.Command, cfg getPageOptions, dbPath string, pageIDs []uint64) (err error) {
48 if cfg.all && len(pageIDs) != 0 {
49 return ErrInvalidPageArgs
50 }
51
52 if _, err := checkSourceDBPath(dbPath); err != nil {
53 return err
54 }
55
56 if cfg.all {
57 printAllPages(cmd, dbPath, cfg.format)
58 } else {
59 printPages(cmd, pageIDs, dbPath, cfg.format)
60 }
61
62 return
63}
64
65func printPages(cmd *cobra.Command, pageIDs []uint64, path string, formatValue string) {
66 // print each page listed.

Callers 1

newPageCommandFunction · 0.85

Calls 3

checkSourceDBPathFunction · 0.85
printAllPagesFunction · 0.85
printPagesFunction · 0.85

Tested by

no test coverage detected