-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdataType.go
42 lines (36 loc) · 1.25 KB
/
dataType.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Full list of data type: <https://www.wikidata.org/wiki/Special:ListDatatypes>
package gowd
import (
)
// DataType := commonsMedia | globe-coordinate |
// wikibase-item | wikibase-property |
// string | monolingualtext |
// external-id | quantity | time |
// url | math | geo-shape | musical-notation | tabular-data |
// wikibase-lexeme | wikibase-form | wikibase-sense
var DataTypeSupports map[string]bool
func init() {
DataTypeSupports = map[string]bool {
"commonsMedia": true,
"globe-coordinate": true,
"wikibase-item": true,
"wikibase-property": true,
"string": true,
"monolingualtext": true,
"external-id": true,
"quantity": true,
"time": true,
"url": true,
"math": true,
"geo-shape": true,
"musical-notation": true,
"tabular-data": true,
"wikibase-lexeme": true,
"wikibase-form": true,
"wikibase-sense": true,
}
}
func IsDataType(s string) bool {
_, exist := DataTypeSupports[s]
return exist
}