FFFF Ignoring continuation character · Issue #44 · go-ini/ini · GitHub
[go: up one dir, main page]

Skip to content

Ignoring continuation character #44

Closed

Description

@mar1ged

I use go-ini for reading .ini files of a Windows application. Unfortunately the developer of that application decided to store pathnames with trailing backslashes:

[Directories]
SourceDir=C:\App\Source\
TargetDir=C:\App\Target\

When I read SourceDir I receive the value C:\App\SourceTargetDir=C:\App\Target\ because the \ gets treated as a continuation char.
Is it possible to tell the library not to handle the continuation char ? Unfortunately I can not change the ini files content because this breaks the application (which was not written by me and can not be changed by me)

Activity

  1. added a commit that references this issue on Jul 2, 2016
  2. unknwon commented on Jul 2, 2016

    @unknwon
    Member

    Now you're able to use:

    cfg, err := ini.LoadSources(ini.LoadOptions{IgnoreContinuation: true}, xxx)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0