github.com/jlmucb/cloudproxy@v0.0.0-20170830161738-b5aa0b619bc4/go/tao/auth/string.go (about) 1 // Copyright (c) 2014, Kevin Walsh. All rights reserved. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package auth 16 17 import ( 18 "fmt" 19 ) 20 21 // Note: Yes, all of these functions are identical, but I don't see a way of 22 // making this shorter in Go. 23 24 // String returns a pretty-printed Prin. 25 func (e Prin) String() string { 26 return fmt.Sprintf("%v", e) 27 } 28 29 // String returns a pretty-printed PrinTail. 30 func (e PrinTail) String() string { 31 return fmt.Sprintf("%v", e) 32 } 33 34 // String returns a pretty-printed PrinExt. 35 func (e PrinExt) String() string { 36 return fmt.Sprintf("%v", e) 37 } 38 39 // String returns a pretty-printed SubPrin. 40 func (e SubPrin) String() string { 41 return fmt.Sprintf("%v", e) 42 } 43 44 // String returns a pretty-printed Int. 45 func (e Int) String() string { 46 return fmt.Sprintf("%v", e) 47 } 48 49 // String returns a pretty-printed Str. 50 func (e Str) String() string { 51 return fmt.Sprintf("%v", e) 52 } 53 54 // String returns a pretty-printed Bytes. 55 func (e Bytes) String() string { 56 return fmt.Sprintf("%v", e) 57 } 58 59 // String returns a pretty-printed TermVar. 60 func (e TermVar) String() string { 61 return fmt.Sprintf("%v", e) 62 } 63 64 // String returns a pretty-printed Pred. 65 func (e Pred) String() string { 66 return fmt.Sprintf("%v", e) 67 } 68 69 // String returns a pretty-printed Const. 70 func (e Const) String() string { 71 return fmt.Sprintf("%v", e) 72 } 73 74 // String returns a pretty-printed Not. 75 func (e Not) String() string { 76 return fmt.Sprintf("%v", e) 77 } 78 79 // String returns a pretty-printed And. 80 func (e And) String() string { 81 return fmt.Sprintf("%v", e) 82 } 83 84 // String returns a pretty-printed Or. 85 func (e Or) String() string { 86 return fmt.Sprintf("%v", e) 87 } 88 89 // String returns a pretty-printed Implies. 90 func (e Implies) String() string { 91 return fmt.Sprintf("%v", e) 92 } 93 94 // String returns a pretty-printed Speaksfor. 95 func (e Speaksfor) String() string { 96 return fmt.Sprintf("%v", e) 97 } 98 99 // String returns a pretty-printed Says. 100 func (e Says) String() string { 101 return fmt.Sprintf("%v", e) 102 } 103 104 // String returns a pretty-printed Forall. 105 func (e Forall) String() string { 106 return fmt.Sprintf("%v", e) 107 } 108 109 // String returns a pretty-printed Exists. 110 func (e Exists) String() string { 111 return fmt.Sprintf("%v", e) 112 }