an app.bsky.* indexer

go fmt

Changed files
+6 -7
models
+6 -7
models/labeler_service.go
···
type LabelerService_ReasonType struct {
LabelerServiceID string
-
Value *string
}
type LabelerService_SubjectCollection struct {
LabelerServiceID string
-
Value string
}
type LabelerService_SubjectType struct {
LabelerServiceID string
-
Value *string
}
-
func NewLabelerService(uri syntax.ATURI, rec []byte) *LabelerService {
var out appbsky.LabelerService
···
for _, reasontype := range out.ReasonTypes {
labeler.ReasonTypes = append(labeler.ReasonTypes, LabelerService_ReasonType{
LabelerServiceID: labeler.ID,
-
Value: reasontype,
})
}
}
···
for _, collection := range out.SubjectCollections {
labeler.SubjectCollections = append(labeler.SubjectCollections, LabelerService_SubjectCollection{
LabelerServiceID: labeler.ID,
-
Value: collection,
})
}
···
for _, stype := range out.SubjectTypes {
labeler.SubjctTypes = append(labeler.SubjctTypes, LabelerService_SubjectType{
LabelerServiceID: labeler.ID,
-
Value: stype,
})
}
}
···
type LabelerService_ReasonType struct {
LabelerServiceID string
+
Value *string
}
type LabelerService_SubjectCollection struct {
LabelerServiceID string
+
Value string
}
type LabelerService_SubjectType struct {
LabelerServiceID string
+
Value *string
}
func NewLabelerService(uri syntax.ATURI, rec []byte) *LabelerService {
var out appbsky.LabelerService
···
for _, reasontype := range out.ReasonTypes {
labeler.ReasonTypes = append(labeler.ReasonTypes, LabelerService_ReasonType{
LabelerServiceID: labeler.ID,
+
Value: reasontype,
})
}
}
···
for _, collection := range out.SubjectCollections {
labeler.SubjectCollections = append(labeler.SubjectCollections, LabelerService_SubjectCollection{
LabelerServiceID: labeler.ID,
+
Value: collection,
})
}
···
for _, stype := range out.SubjectTypes {
labeler.SubjctTypes = append(labeler.SubjctTypes, LabelerService_SubjectType{
LabelerServiceID: labeler.ID,
+
Value: stype,
})
}
}