@@ -82,7 +82,7 @@ func NewShell(url string) *Shell {
82
82
func NewDirectShell (url string ) * Shell {
83
83
return & Shell {
84
84
url : url ,
85
- httpcli : & gohttp.Client {
85
+ httpcli : gohttp.Client {
86
86
Transport : & gohttp.Transport {
87
87
Proxy : gohttp .ProxyFromEnvironment ,
88
88
DisableKeepAlives : true ,
@@ -118,7 +118,7 @@ func NewShellWithClient(url string, c *gohttp.Client) *Shell {
118
118
func (s * Shell ) WithAuthorization (token string ) * Shell {
119
119
return & Shell {
120
120
url : s .url ,
121
- httpcli : & gohttp.Client {
121
+ httpcli : gohttp.Client {
122
122
Transport : newAuthenticatedTransport (s .httpcli .Transport , token ),
123
123
},
124
124
}
@@ -160,18 +160,6 @@ func (s *Shell) ID(peer ...string) (*IdOutput, error) {
160
160
return & out , nil
161
161
}
162
162
163
- // Cat the content at the given path. Callers need to drain and close the returned reader after usage.
164
- func (s * Shell ) CatGet (path string ) (io.ReadCloser , error ) {
165
- resp , err := NewRequest (context .Background (), s .url , "cat" , path ).SendGET (s .httpcli )
166
- if err != nil {
167
- return nil , err
168
- }
169
- if resp .Error != nil {
170
- return nil , resp .Error
171
- }
172
- return resp .Output , nil
173
- }
174
-
175
163
// Cat the content at the given path. Callers need to drain and close the returned reader after usage.
176
164
func (s * Shell ) Cat (path string ) (io.ReadCloser , error ) {
177
165
resp , err := s .Request ("cat" , path ).Send (context .Background ())
0 commit comments