Categorygithub.com/reddtsai/goREPL
modulepackage
1.0.1
Repository: https://github.com/reddtsai/gorepl.git
Documentation: pkg.go.dev

# README

REPL

This is a command-line program developed by Golang, allowing users to operate the file system through commands.

Build Status

Installation & Start

Once you have installed Go, install goREPL

go install github.com/reddtsai/[email protected]

Go 1.21+

start on mac

./goREPL

start on windows

.\goREPL.exe

Commands

User Management

Register

register [username]

Register a user.

ParameterTypeLenghtDesc
usernamestring3 - 20case insensitive, can only contain letters and numbers.
ResponseContent
Successadd [username] successfully
Errorunrecognized argument
Errorthe [username] invalid length
Errorthe [username] contain invalid chars
Errorthe [username] has already existed

Folder Management

Create Folder

create-folder [username] [foldername] [description]?

Create a folder for a user.

ParameterTypeLenghtDesc
usernamestring3 - 20case insensitive, contain only contain letters and numbers.
foldernamestring1 - 100case insensitive, contain only the following characters: uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), periods (.), hyphens (-), tildes (~), underscores (_), equal signs (=), and colons (:).
descriptionstring500you can use either double quotes (“”) or single quotes(‘’).
ResponseContent
Successcreate [foldername] successfully
Errorunrecognized argument
Errorthe [username] doesn't exist
Errorthe [foldername] invalid length
Errorthe [foldername] contain invalid chars
Errorthe [foldername] has already existed
Errorthe [description] invalid length

Delete Folder

delete-folder [username] [foldername]

Delete a folder for a user.

ParameterTypeLenghtDesc
usernamestring3 - 20case insensitive, contain only contain letters and numbers.
foldernamestring1 - 100case insensitive, contain only the following characters: uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), periods (.), hyphens (-), tildes (~), underscores (_), equal signs (=), and colons (:).
ResponseContent
Successdelete [foldername] successfully
Errorunrecognized argument
Errorthe [username] doesn't exist
Errorthe [foldername] doesn't exist

List Folders

list-folders [username] [--sort-name|--sort-created] [asc|desc]

List user folders.

ParameterTypeLenghtDesc
usernamestring3 - 20case insensitive, can only contain letters and numbers.
OptionArgumentMemo
--sort-nameasc, desc--sort-name asc is defaule option
--sort-createdasc, desc
ResponseContent
SuccessList {foldername description createat username }
Warningthe [username] doesn't have any folders
Errorunrecognized argument
Errorthe [username] doesn't exist

Rename Folder

rename-folder [username] [foldername] [newfoldername]

Rename a folder for a user.

ParameterTypeLenghtDesc
usernamestring3 - 20case insensitive, contain only contain letters and numbers.
foldernamestring1 - 100case insensitive, contain only the following characters: uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), periods (.), hyphens (-), tildes (~), underscores (_), equal signs (=), and colons (:).
newfoldernamestring1 - 100case insensitive, contain only the following characters: uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), periods (.), hyphens (-), tildes (~), underscores (_), equal signs (=), and colons (:).
ResponseContent
Successrename [foldername] to [newfoldername] successfully
Errorunrecognized argument
Errorthe [username] doesn't exist
Errorthe [foldername] doesn't exist
Errorthe [newfoldername] invalid length
Errorthe [newfoldername] contain invalid chars
Errorthe [newfoldername] has already existed

File Management

Create File

create-file [username] [foldername] [filename] [description]?

Create a file for a user.

ParameterTypeLenghtDesc
usernamestring3 - 20case insensitive, contain only contain letters and numbers.
foldernamestring1 - 100case insensitive, contain only the following characters: uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), periods (.), hyphens (-), tildes (~), underscores (_), equal signs (=), and colons (:).
filenamestring1 - 100case insensitive, contain only the following characters: uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), periods (.), hyphens (-), tildes (~), underscores (_), equal signs (=), and colons (:).
descriptionstring500you can use either double quotes (“”) or single quotes(‘’).
ResponseContent
Successcreate [filename] in [username]/[foldername] successfully
Errorunrecognized argument
Errorthe [username] doesn't exist
Errorthe [foldername] doesn't exist
Errorthe [filename] invalid length
Errorthe [filename] contain invalid chars
Errorthe [filename] has already existed
Errorthe [description] invalid length

Delete File

delete-file [username] [foldername] [filename]

Delete a file for a user.

ParameterTypeLenghtDesc
usernamestring3 - 20case insensitive, contain only contain letters and numbers.
foldernamestring1 - 100case insensitive, contain only the following characters: uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), periods (.), hyphens (-), tildes (~), underscores (_), equal signs (=), and colons (:).
filenamestring1 - 100case insensitive, contain only the following characters: uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), periods (.), hyphens (-), tildes (~), underscores (_), equal signs (=), and colons (:).
ResponseContent
Successdelete [filename] in [username]/[foldername] successfully
Errorunrecognized argument
Errorthe [username] doesn't exist
Errorthe [foldername] doesn't exist
Errorthe [filename] doesn't exist

List Files

list-files [username] [foldername] [--sort-name|--sort-created] [asc|desc]

ParameterTypeLenghtDesc
usernamestring3 - 20case insensitive, can only contain letters and numbers.
foldernamestring1 - 100case insensitive, contain only the following characters: uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), periods (.), hyphens (-), tildes (~), underscores (_), equal signs (=), and colons (:).
OptionArgumentMemo
--sort-nameasc, desc--sort-name asc is defaule option
--sort-createdasc, desc
ResponseContent
SuccessList {filename description createat foldername username }
Warningthe [foldername] is empty
Errorunrecognized argument
Errorthe [username] doesn't exist
Errorthe [foldername] doesn't exist

Help

help

List all command.

Exit

exit

Close command prompt.

# Packages

No description provided by the author
No description provided by the author