Skip to content

Commit

Permalink
Move the documentation for SFBool to the right place.
Browse files Browse the repository at this point in the history
This fixes the issue where the SFBool documentation is presented as package level documentation by godoc.org which may lead people to believe that the sobjects package should not be used at all.
  • Loading branch information
geoffgarside authored and nimajalali committed Aug 2, 2017
1 parent 0244aa9 commit 4af2d0d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sobjects/bool.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
package sobjects

import "encoding/json"

// Don't use this! It was an interesting effort but in reality all you need is a ptr to a bool. *bool will solve all your problems. :)
// Used to represent empty bools. Go types are always instantiated with a default value, for bool the default value is false.
// This makes it difficult to update an SObject without overwriting any boolean field to false.
Expand All @@ -10,10 +14,6 @@
// If no value is set the unmarshaller will skip the field and the int will default to 0.
// Marshalling: -1 will be marshaled to false, 1 will be marshaled to true, and
// 0 will be marshaled to nothing (assuming the field has the omitempty json tag `json:",omitempty"`)
package sobjects

import "encoding/json"

type SFBool int

func (t *SFBool) MarshalJSON() ([]byte, error) {
Expand Down

0 comments on commit 4af2d0d

Please sign in to comment.