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

Unified Diff: logdog/client/cmd/logdog/trinaryFlag.go

Issue 2372703005: LogDog: Split CLI tool into package and main. (Closed)
Patch Set: Fix comment. Created 4 years, 3 months 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
« no previous file with comments | « logdog/client/cmd/logdog/subcommandQuery.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: logdog/client/cmd/logdog/trinaryFlag.go
diff --git a/logdog/client/cmd/logdog/trinaryFlag.go b/logdog/client/cmd/logdog/trinaryFlag.go
deleted file mode 100644
index 2aa3d536b31f72689e5d107b42d33b08ba02f9cf..0000000000000000000000000000000000000000
--- a/logdog/client/cmd/logdog/trinaryFlag.go
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2015 The LUCI Authors. All rights reserved.
-// Use of this source code is governed under the Apache License, Version 2.0
-// that can be found in the LICENSE file.
-
-package main
-
-import (
- "flag"
-
- "github.com/luci/luci-go/common/flag/flagenum"
- "github.com/luci/luci-go/logdog/client/coordinator"
-)
-
-type trinaryValue coordinator.QueryTrinary
-
-var _ flag.Value = (*trinaryValue)(nil)
-
-var trinaryFlagEnum = flagenum.Enum{
- "": coordinator.Both,
- "yes": coordinator.Yes,
- "no": coordinator.No,
-}
-
-func (v trinaryValue) Trinary() coordinator.QueryTrinary {
- return coordinator.QueryTrinary(v)
-}
-
-func (v *trinaryValue) String() string {
- return trinaryFlagEnum.FlagString(*v)
-}
-
-func (v *trinaryValue) Set(s string) error {
- var tv coordinator.QueryTrinary
- if err := trinaryFlagEnum.FlagSet(&tv, s); err != nil {
- return err
- }
- *v = trinaryValue(tv)
- return nil
-}
« no previous file with comments | « logdog/client/cmd/logdog/subcommandQuery.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698