Skip to content

Instantly share code, notes, and snippets.

@richardlehane
Created July 18, 2020 16:38
Show Gist options
  • Save richardlehane/23fc0e35d385fb15a28b2deab2174041 to your computer and use it in GitHub Desktop.
Save richardlehane/23fc0e35d385fb15a28b2deab2174041 to your computer and use it in GitHub Desktop.
// Assumes that we only want to parse text strings that are simple signatures anchored at the beginning of the file (i.e. no signatures that have BOF and EOF bits)
func FormatStr(id, str string) (frames.Signature, error) {
sig, _, _, err := process(id, str, false)
if err != nil {
return err
}
sig[0] = frames.NewFrame(frames.BOF, seg[0].Pattern, seg[0].Min, seg[0].Max)
return sig, nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment