Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to read file: key-value delimiter not found: } #344

Open
1 task done
0xc9e36 opened this issue Aug 1, 2023 · 0 comments
Open
1 task done

Fail to read file: key-value delimiter not found: } #344

0xc9e36 opened this issue Aug 1, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@0xc9e36
Copy link

0xc9e36 commented Aug 1, 2023

Version

v1.67.0

Describe the bug

I configured a value in json format, but it cannot be parsed correctly

To reproduce

my.ini

[server]
timeout = {
    "timeout":1000
}

main.go

package main

import (
	"fmt"
	"os"

	"gopkg.in/ini.v1"
)

func main() {
	cfg, err := ini.Load("my.ini")
	if err != nil {
		fmt.Printf("Fail to read file: %v", err)
		os.Exit(1)
	}
	s := cfg.Section("server")
	m := s.KeysHash()
	fmt.Println(m)
}

Expected behavior

value is uncompressed json and can be processed correctly

Additional context

Of course, the json after value compression can be processed correctly, but my situation is quite special, the value is input by the user, and I have no control

Code of Conduct

  • I agree to follow this project's Code of Conduct
@0xc9e36 0xc9e36 added the bug Something isn't working label Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant