github.com/jlmucb/cloudproxy@v0.0.0-20170830161738-b5aa0b619bc4/go/tao/auth/shortstring.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 // ShortString returns an elided pretty-printed Prin. 25 func (e Prin) ShortString() string { 26 return fmt.Sprintf("%s", e) 27 } 28 29 // ShortString returns an elided pretty-printed PrinTail. 30 func (e PrinTail) ShortString() string { 31 return fmt.Sprintf("%s", e) 32 } 33 34 // ShortString returns an elided pretty-printed PrinExt. 35 func (e PrinExt) ShortString() string { 36 return fmt.Sprintf("%s", e) 37 } 38 39 // ShortString returns an elided pretty-printed SubPrin. 40 func (e SubPrin) ShortString() string { 41 return fmt.Sprintf("%s", e) 42 } 43 44 // ShortString returns an elided pretty-printed Int. 45 func (e Int) ShortString() string { 46 return fmt.Sprintf("%s", e) 47 } 48 49 // ShortString returns an elided pretty-printed Str. 50 func (e Str) ShortString() string { 51 return fmt.Sprintf("%s", e) 52 } 53 54 // ShortString returns a pretty-printed Bytes. 55 func (e Bytes) ShortString() string { 56 return fmt.Sprintf("%s", e) 57 } 58 59 // ShortString returns an elided pretty-printed TermVar. 60 func (e TermVar) ShortString() string { 61 return fmt.Sprintf("%s", e) 62 } 63 64 // ShortString returns an elided pretty-printed Pred. 65 func (e Pred) ShortString() string { 66 return fmt.Sprintf("%s", e) 67 } 68 69 // ShortString returns an elided pretty-printed Const. 70 func (e Const) ShortString() string { 71 return fmt.Sprintf("%s", e) 72 } 73 74 // ShortString returns an elided pretty-printed Not. 75 func (e Not) ShortString() string { 76 return fmt.Sprintf("%s", e) 77 } 78 79 // ShortString returns an elided pretty-printed And. 80 func (e And) ShortString() string { 81 return fmt.Sprintf("%s", e) 82 } 83 84 // ShortString returns an elided pretty-printed Or. 85 func (e Or) ShortString() string { 86 return fmt.Sprintf("%s", e) 87 } 88 89 // ShortString returns an elided pretty-printed Implies. 90 func (e Implies) ShortString() string { 91 return fmt.Sprintf("%s", e) 92 } 93 94 // ShortString returns an elided pretty-printed Speaksfor. 95 func (e Speaksfor) ShortString() string { 96 return fmt.Sprintf("%s", e) 97 } 98 99 // ShortString returns an elided pretty-printed Says. 100 func (e Says) ShortString() string { 101 return fmt.Sprintf("%s", e) 102 } 103 104 // ShortString returns an elided pretty-printed Forall. 105 func (e Forall) ShortString() string { 106 return fmt.Sprintf("%s", e) 107 } 108 109 // ShortString returns an elided pretty-printed Exists. 110 func (e Exists) ShortString() string { 111 return fmt.Sprintf("%s", e) 112 }