MCPcopy Create free account
hub / github.com/Creatly/creatly-backend / stringArrayToObjectId

Function stringArrayToObjectId

internal/service/packages.go:140–153  ·  view source on GitHub ↗
(stringIds []string)

Source from the content-addressed store, hash-verified

138}
139
140func stringArrayToObjectId(stringIds []string) ([]primitive.ObjectID, error) {
141 var err error
142
143 ids := make([]primitive.ObjectID, len(stringIds))
144
145 for i, id := range stringIds {
146 ids[i], err = primitive.ObjectIDFromHex(id)
147 if err != nil {
148 return nil, err
149 }
150 }
151
152 return ids, nil
153}

Callers 4

CreateMethod · 0.70
UpdateMethod · 0.70
CreateMethod · 0.70
UpdateMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected