GetTopicCat given topic name returns topic category.
(name string)
| 1372 | |
| 1373 | // GetTopicCat given topic name returns topic category. |
| 1374 | func GetTopicCat(name string) TopicCat { |
| 1375 | switch name[:3] { |
| 1376 | case "usr": |
| 1377 | return TopicCatMe |
| 1378 | case "p2p": |
| 1379 | return TopicCatP2P |
| 1380 | case "grp", "chn": |
| 1381 | return TopicCatGrp |
| 1382 | case "fnd": |
| 1383 | return TopicCatFnd |
| 1384 | case "sys": |
| 1385 | return TopicCatSys |
| 1386 | case "slf": |
| 1387 | return TopicCatSlf |
| 1388 | default: |
| 1389 | panic("invalid topic type for name '" + name + "'") |
| 1390 | } |
| 1391 | } |
| 1392 | |
| 1393 | // IsEphemeralTopic checks if the topic is ephemeral, i.e. it's a reference to the user, |
| 1394 | // it's not stored in the 'topics' table like 'me' or 'fnd' topics. |
no outgoing calls
no test coverage detected
searching dependent graphs…