MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / loadCurrentUserName

Function loadCurrentUserName

agent/app/service/ssh.go:296–302  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

294}
295
296func loadCurrentUserName() string {
297 currentUser, err := user.Current()
298 if err != nil || currentUser.Name == "" {
299 return "root"
300 }
301 return currentUser.Name
302}
303
304func handleSSHPortUpdate(oldValue, newValue string) {
305 sudo := cmd.SudoHandleCmd()

Callers 1

GetSSHInfoMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected