question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Associate context with a string

See original GitHub issue

@Ana06

In some cases it could be useful to associate context with a string as it can be done with numbers. For example:

- string: "{3E5FC7F9-9A51-4367-9063-A120244FBEC7}" = CLSID_CMSTPLUA

@mr-tz

hm, good point! maybe it makes sense to make the extra context available to all features.

@williballenthin

+1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mr-tzcommented, Jun 26, 2020

Hm, interesting. For consistency doing it the same way for all features would be good. If the parsing becomes to annoying or the syntax to cumbersome, this string / context (description) could work well:

- string: everything and anything
  description: my description

- number: 16
  description: a good number

0reactions
williballenthincommented, Jun 29, 2020

from offline decision:

for all features but string, continue to support inline description using =. for string, the parsing is too complex to be worth it right now.

therefore, for all features, including string, also support description:.

the second form is the only way to describe a string. for other features, its use is discouraged, unless the description is long.

Read more comments on GitHub >

github_iconTop Results From Across the Web

String context | Localization API - Drupal
This is done by adding text to make unique strings for each meaning. This extra text is called string context. ("Translation context" is...
Read more >
Help with Select-String and Context when output to file
I have a simple script to pull some lines from text files. It works great if I don't add the pipe to export....
Read more >
context.WithValue: how to add several key-value pairs
context.Context is an immutable object, "extending" it with a key-value pair is only possible by making a copy of it and adding the...
Read more >
Personalizing the dialog with context - IBM Cloud Docs
Defining a context variable · Click to open the dialog node to which you want to add a context variable. · Go to...
Read more >
How To Use Contexts in Go - DigitalOcean
Many functions in Go use the context package to gather additional information ... but this tutorial will be using string keys and values....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found