message.go 608 B

1234567891011121314
  1. // Copyright (c) 2020 Tailscale Inc & AUTHORS All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // Package empty defines an empty struct type.
  5. package empty
  6. // Message is an empty message. Its purpose is to be used as pointer
  7. // type where nil and non-nil distinguish whether it's set. This is
  8. // used instead of a bool when we want to marshal it as a JSON empty
  9. // object (or null) for the future ability to add other fields, at
  10. // which point callers would define a new struct and not use
  11. // empty.Message.
  12. type Message struct{}