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

fix: body or footer has a line start with token but no empty before #11

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

falsedlah
Copy link

  • The fix apply only when the line start with token

The following example was failing with nul, after the proposed fix, it is working.

package main

import (
	"encoding/json"
	"fmt"

	"github.com/zbindenren/cc"
)

func main() {
	msg := `feat!: [BQ-627] [Fundamentals Peers] Apply entities permissioning (#55)

When the permissioning system was introduced on the universe, we automatically had permissions applied to all our FUN APIs.

##### Before
What we didn't took into account is that currently, in order to get a company peers we get the top 10 entities (based on the known filter/sorting criterias) and we apply permissions on the top 10 filtered.
ex: if a client is only enabled to XETRA exchange and he will search for APC:DE, we:
- get the top 10 entities worldwide
- out of those top 10 entities we keep only those that have instruments on XETRA

##### After
Instead of applying permissions on the top 10 peers retrieved for the requested entity, first get the entities to which the user is permissioned and get top 10 out of the permissioned ones.
`

	c, _ := cc.Parse(msg)
	d, _ := json.MarshalIndent(c, "", "  ")

	fmt.Println(string(d))
	//fmt.Println(string(c.BreakingMessage()))
	fmt.Println("Hello, World!")
}

@falsedlah
Copy link
Author

@zbindenren , any better solution will be apperciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant