EncodeSourceLinkID encode source link id to hash id
(encoder Encoder, id int)
| 143 | |
| 144 | // EncodeSourceLinkID encode source link id to hash id |
| 145 | func EncodeSourceLinkID(encoder Encoder, id int) string { |
| 146 | res, _ := encoder.Encode([]int{id, SourceLinkID}) |
| 147 | return res |
| 148 | } |
| 149 | |
| 150 | func FromContext(c context.Context) int { |
| 151 | return c.Value(ObjectIDCtx{}).(int) |
no test coverage detected