github.com/kanishk98/terraform@v1.3.0-dev.0.20220917174235-661ca8088a6a/internal/command/arguments/types.go (about) 1 package arguments 2 3 // ViewType represents which view layer to use for a given command. Not all 4 // commands will support all view types, and validation that the type is 5 // supported should happen in the view constructor. 6 type ViewType rune 7 8 const ( 9 ViewNone ViewType = 0 10 ViewHuman ViewType = 'H' 11 ViewJSON ViewType = 'J' 12 ViewRaw ViewType = 'R' 13 ) 14 15 func (vt ViewType) String() string { 16 switch vt { 17 case ViewNone: 18 return "none" 19 case ViewHuman: 20 return "human" 21 case ViewJSON: 22 return "json" 23 case ViewRaw: 24 return "raw" 25 default: 26 return "unknown" 27 } 28 }