Skip to content

Commit

Permalink
Merge pull request #89 from phoracek/master
Browse files Browse the repository at this point in the history
introduce MakeVariantWithSignature
  • Loading branch information
jsouthworth authored Aug 22, 2017
2 parents bd29ed6 + ea50d34 commit 9764685
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion variant.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ type Variant struct {
// MakeVariant converts the given value to a Variant. It panics if v cannot be
// represented as a D-Bus type.
func MakeVariant(v interface{}) Variant {
return Variant{SignatureOf(v), v}
return MakeVariantWithSignature(v, SignatureOf(v))
}

// MakeVariantWithSignature converts the given value to a Variant.
func MakeVariantWithSignature(v interface{}, s Signature) Variant {
return Variant{s, v}
}

// ParseVariant parses the given string as a variant as described at
Expand Down

0 comments on commit 9764685

Please sign in to comment.