Skip to content

Commit

Permalink
print out repo migrate events in read-stream (#428)
Browse files Browse the repository at this point in the history
  • Loading branch information
whyrusleeping authored Nov 18, 2023
2 parents ab2c4b3 + 76d7248 commit 536f1df
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions cmd/gosky/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,19 @@ var readRepoStreamCmd = &cli.Command{

return nil
},
RepoMigrate: func(migrate *comatproto.SyncSubscribeRepos_Migrate) error {
if jsonfmt {
b, err := json.Marshal(migrate)
if err != nil {
return err
}
fmt.Println(string(b))
} else {
fmt.Printf("(%d) RepoMigrate: %s moving to: %s\n", migrate.Seq, migrate.Did, *migrate.MigrateTo)
}

return nil
},
RepoHandle: func(handle *comatproto.SyncSubscribeRepos_Handle) error {
if jsonfmt {
b, err := json.Marshal(handle)
Expand Down

0 comments on commit 536f1df

Please sign in to comment.