-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example for interacting with remote file servers #1061
base: development
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests are failing, please check. Also while fixing please update the branch as well.
HOST="localhost" | ||
USER_NAME="anonymous" | ||
PASSWORD="test" | ||
PORT=21 | ||
REMOTE_DIR_PATH="/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
configs ain't necessarily needed to pass within double quotes (""
)
To get the list of all directories or files in the given path of the configured remote file server | ||
|
||
``` | ||
go run main.go ls -path=<path> | ||
|
||
Eg:- go run main.go ls -path=/ | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func registerCreateFileCommand(app *gofr.App, fs file.FileSystemProvider) { | ||
app.SubCommand("createfile", func(c *gofr.Context) (interface{}, error) { | ||
fileName := c.Param("filename") | ||
fmt.Printf("Creating file :%s", fileName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we use gofr logger instead of fmt.Printf
?
Pull Request Template
Description:
Additional Information:
Checklist:
goimport
andgolangci-lint
.Thank you for your contribution!