github.com/taubyte/tau-cli@v0.1.13-0.20240326000942-487f0d57edfc/table/library/list_test.go (about) 1 package libraryTable_test 2 3 import ( 4 structureSpec "github.com/taubyte/go-specs/structure" 5 libraryTable "github.com/taubyte/tau-cli/table/library" 6 ) 7 8 func ExampleList() { 9 libraries := []*structureSpec.Library{ 10 { 11 Id: "QmbAA8hRosp5BaXFXikADCtpkQCgQCPdRVhnxjiSHfXdWH", 12 Name: "someLibrary1", 13 Provider: "github", 14 RepoName: "taubyte-test/test_site1", 15 }, 16 { 17 Id: "QmbUIDhRosp5BaXDASEWSCtpkQCgQCPdRVhnxjiSHfXdC0", 18 Name: "someLibrary2", 19 Provider: "github", 20 RepoName: "taubyte-test/test_site2", 21 }, 22 } 23 24 libraryTable.List(libraries) 25 26 // Output: 27 // ┌─────────────────┬────────────────────────────────────────────┐ 28 // │ ID │ NAME │ 29 // │ │ REPOSITORY │ 30 // ├─────────────────┼────────────────────────────────────────────┤ 31 // │ QmbAA8...HfXdWH │ someLibrary1 │ 32 // │ │ https://github.com/taubyte-test/test_site1 │ 33 // ├─────────────────┼────────────────────────────────────────────┤ 34 // │ QmbUID...HfXdC0 │ someLibrary2 │ 35 // │ │ https://github.com/taubyte-test/test_site2 │ 36 // └─────────────────┴────────────────────────────────────────────┘ 37 }