Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(465)

Unified Diff: service/datastore/types.go

Issue 1521823003: Clean up callback interfaces. (Closed) Base URL: https://github.com/luci/gae.git@extra
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: service/datastore/types.go
diff --git a/service/datastore/types.go b/service/datastore/types.go
index 4a747e41b2783bd118d485be3d2662b25cbad807..94780f8408ba1cdb889836df6ca330d24d754559 100644
--- a/service/datastore/types.go
+++ b/service/datastore/types.go
@@ -2,11 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-package datastore
+//go:generate stringer -type=Toggle
-import (
- "fmt"
-)
+package datastore
// GeoPoint represents a location as latitude/longitude in degrees.
//
@@ -49,16 +47,3 @@ const (
On
Off
)
-
-func (b Toggle) String() string {
- switch b {
- case Auto:
- return "Auto"
- case On:
- return "On"
- case Off:
- return "Off"
- default:
- return fmt.Sprintf("UNKNOWN_Toggle(%d)", b)
- }
-}

Powered by Google App Engine
This is Rietveld 408576698