modify

command
v0.0.0-...-c496913 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

README

Modify plugin

Allows to modify parameters of existing graph elements.

Compile with:

go build -buildmode=plugin -ldflags="-w" -o modify.so ./*.go

Configuration

YAML definition's data fields:

  • group: as all graph nodes belong to some group/type, it can be used to apply modifications to the specific group only
  • modify: list of replacements. If regex matches node/edge's field value - put replacement instead

More info about used function: https://pkg.go.dev/regexp#Regexp.ReplaceAllString, where: - MustCompile receives regex - ReplaceAllString receives graph field value and replacement

List of replacements example:

modify:
    - field: field_name
      regex: a(x*)b
      replacement: y

    # Anonymize prices
    - field: price
      regex: (?i)\d{1,3}(?:[.,]\d{3})*(?:[.,]\d{2}) *(eur|€)
      replacement: *** Eur

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL