Skip to content

[Bug] Syncfile can not Filter configuration item that contain middle space #345

Open
@caoxianfei1

Description

@caoxianfei1

Report a bug.

SyncFile step contains three steps:

  1. Read primary config file to a temporary file.
  2. Filter key and value according to delimtier(such as '=' or ':') and mutate item according vaiable that user configure.
  3. Write modified content back to file.
    you can see at
    func (s *SyncFile) Execute(ctx *context.Context) error {

However, configuration items containing middle spaces cannot be filtered. If one or more spaces, they will be truncated.

for example:

s3.user_agent=S3 Browser

will be filter as follow:

s3.user_agent=S3

The reason may be REGEX_KV_SPLIT

REGEX_KV_SPLIT = "^(([^%s]+)%s\\s*)([^\\s#]*)" // key: mu[2] value: mu[3]

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions