aboutsummaryrefslogtreecommitdiff
path: root/lib/ssh/sftp/file_attrs.go
AgeCommit message (Collapse)Author
10 daysall: apply go fixShulhan
2025-01-23all: replace "interface{}" with "any"Shulhan
2024-03-05all: comply with linter recommendations #1Shulhan
Instead of annotating the lines that caught by linters, fix it to comply with the recommendations. This causes several breaking changes, especially related to naming, * api/slack: [Message.IconUrl] become [Message.IconURL] * lib/dns: DefaultSoaMinumumTtl become DefaultSoaMinimumTTL * lib/email: [Message.SetBodyHtml] become [Message.SetBodyHTML] * lib/http: [Client.GenerateHttpRequest] become [Client.GenerateHTTPRequest] * lib/http: [ClientOptions.ServerUrl] become [ClientOptions.ServerURL] * lib/http: [EndpointRequest.HttpWriter] become [EndpointRequest.HTTPWriter] * lib/http: [EndpointRequest.HttpRequest] become [EndpointRequest.HTTPRequest] * lib/http: [ServerOptions.EnableIndexHtml] become [ServerOptions.EnableIndexHTML] * lib/http: [SSEConn.HttpRequest] become [SSEConn.HTTPRequest] * lib/smtp: [ClientOptions.ServerUrl] become [ClientOptions.ServerURL] * lib/ssh/sftp: [FileAttrs.SetUid] become [FileAttrs.SetUID] * lib/ssh/sftp: [FileAttrs.Uid] become [FileAttrs.UID]
2023-12-17ssh/sftp: use fixed slice length when converting in unpackFileAttrsShulhan
This is to make sure that the passed value is in the correct, expected size.
2023-12-17ssh/sftp: update comments to use references [...]Shulhan
2023-12-13all: fix linter warnings reported by reviveShulhan
There are some reports that I disagree with revive, in example, code should not declare the type after variables. In my opinion, on some cases, declaring the type make the code more readable and explicit. Since I did not want to add new configuration file, we changes it and follow revive for now.
2023-09-11ssh/sftp: realign struct for better size allocationShulhan
The realignment reduce the cost of the following struct, * Client: from 88 to 80 bytes (-8) * dirEntry: from 40 to 32 bytes (-8) * FileAttrs: from 72 to 64 bytes (-8) * packet: from 128 to 88 bytes (-40) While at it, add missing comment to FileHandle type.
2022-05-09all: reformat all codes using gofmt 1.19 (the Go tip)Shulhan
2021-07-12ssh/sftp: make the package compatible with standard fs packageShulhan
List of changes, * Rename Node type to dirEntry and implement fs.DirEntry on it * Change the Client Readdir, Readlink, and Realpath to return fs.DirEntry * Make the response packet garbage collected by storing the result in returned type and setting the response packet fields to nil * Add field name to FileAttrs, which store the remote file name * Implement fs.FileInfo interface in FileAttrs * Store the remote path on FileHandle
2021-07-12ssh/sftp: new package that implement SSH File Transport Protocol v3Shulhan
The sftp package extend the golang.org/x/crypto/ssh package by implementing "sftp" subsystem using the ssh.Client connection.