Skip to content

Commit

Permalink
fixup! js/k6/exec: Allow to set state's Tags
Browse files Browse the repository at this point in the history
  • Loading branch information
codebien committed Nov 2, 2021
1 parent 9ac20d7 commit aaf5192
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions js/modules/k6/execution/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,11 @@ func (o *tagsDynamicObject) Get(key string) goja.Value {
return o.Runtime.ToValue(tag)
}

// Set a property value for the key. Return true if succeed.
// If a type different from a string is passed as value then
// it will be implicitly converted to the goja's relative string representation.
// Set a property value for the key. It returns true if succeed.
// String, Boolean and Number types are implicitly converted
// to the goja's relative string representation.
// In any other case, if the Throw option is set then an error is raised
// otherwise just a Warning is written.
func (o *tagsDynamicObject) Set(key string, val goja.Value) bool {
switch val.ExportType().Kind() { //nolint:exhaustive
case
Expand Down

0 comments on commit aaf5192

Please sign in to comment.