File: gomod.yaml

package info (click to toggle)
micro 2.0.15-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 2,828 kB
  • sloc: sh: 247; makefile: 77; xml: 53
file content (31 lines) | stat: -rw-r--r-- 699 bytes parent folder | download | duplicates (3)
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
filetype: gomod

detect:
    filename: "go.mod"

rules:
    # URL
    - type: "(^|[ \\t])+\\b([a-zA-Z0-9-]+\\.?)+(/[a-zA-Z0-9-_\\.]+)*\\b"

    # Keywords
    - special: "(^|[ \\t])+\\b(module|go)\\b"
    - preproc: "(^|[ \\t])+\\b(toolchain|require|exclude|replace|retract)\\b"
    - symbol.operator: "=>"

    # Brackets
    - type: "(\\(|\\))"

    # Go version
    - type: "(^|[ \\t])+([0-9]+\\.?)+"

    # Version
    - constant.string: "(^|[ \\t])+v([0-9]+\\.?){3}.*"
    - constant.number: "(^|[ \\t])+v([0-9]+\\.?){3}"

    - comment:
        start: "//"
        end: "$"
        rules:
            - todo: "(indirect):?"

# (^|[ \\t])+ means after start of string or space or tab character