Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Think about tags.Set design #48

Closed
zombiezen opened this issue Oct 17, 2017 · 2 comments
Closed

Think about tags.Set design #48

zombiezen opened this issue Oct 17, 2017 · 2 comments

Comments

@zombiezen
Copy link

It's unclear whether tags.Set is intended to be mutable or immutable. @rakyll mentioned wanting to hide the encoding details from the user, so I recommended the following:

type Set map[Key]Value

func (set Set) Copy() Set

type Value struct {
  b []byte
}

func StringValue(s string) Value {
  return Value{[]byte(s)}
}

func Int64Value(i int64) Value {
  return Value{[]byte{/* encode the int */}}
}
@rakyll rakyll added the tags label Oct 17, 2017
@rakyll
Copy link
Contributor

rakyll commented Oct 18, 2017

We are considering to have only string values in the future, so I am going to keep this on hold until the data model is finalized.

@rakyll
Copy link
Contributor

rakyll commented Nov 10, 2017

This issue is now obsolete due to #98.

@rakyll rakyll closed this as completed Nov 10, 2017
@rakyll rakyll added this to the R1 milestone Dec 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants