MCPcopy Index your code
hub / github.com/apache/answer / DeShortID

Function DeShortID

pkg/uid/sid.go:73–82  ·  view source on GitHub ↗
(sid string)

Source from the content-addressed store, hash-verified

71}
72
73func DeShortID(sid string) string {
74 num, err := strconv.ParseInt(sid, 10, 64)
75 if err != nil {
76 return strconv.FormatInt(ShortIDToNum(sid), 10)
77 }
78 if num < 10000000000000000 {
79 return strconv.FormatInt(ShortIDToNum(sid), 10)
80 }
81 return sid
82}
83
84func IsShortID(id string) bool {
85 num, err := strconv.ParseInt(id, 10, 64)

Callers 15

QuestionURLFunction · 0.92
AnswerURLFunction · 0.92
addUniqueIDFunction · 0.92
CollectionSwitchMethod · 0.92
FollowMethod · 0.92
AddCommentMethod · 0.92
GetCommentWithPageMethod · 0.92
VoteUpMethod · 0.92
VoteDownMethod · 0.92
RemoveQuestionMethod · 0.92
OperationQuestionMethod · 0.92
CloseQuestionMethod · 0.92

Calls 1

ShortIDToNumFunction · 0.85

Tested by

no test coverage detected