Skip to content
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

Golint is not very happy with code in this module #9

Open
vodolaz095 opened this issue Oct 14, 2021 · 2 comments
Open

Golint is not very happy with code in this module #9

vodolaz095 opened this issue Oct 14, 2021 · 2 comments

Comments

@vodolaz095
Copy link

[vodolaz095@alarmpi keyctl]$ golint
key.go:7:1: comment on exported type Key should be of the form "Key ..." (with optional leading article)
key.go:18:1: comment on exported method Key.Id should be of the form "Id ..."
key.go:19:15: method Id should be ID
key.go:23:1: comment on exported method Key.ExpireAfter should be of the form "ExpireAfter ..."
key.go:30:1: comment on exported method Key.Info should be of the form "Info ..."
keyring.go:7:1: package comment should be of the form "Package keyctl ..."
keyring.go:10:1: comment on exported type Id should be of the form "Id ..." (with optional leading article)
keyring.go:11:6: type Id should be ID
keyring.go:18:1: comment on exported type Keyring should be of the form "Keyring ..." (with optional leading article)
keyring.go:26:1: comment on exported type NamedKeyring should be of the form "NamedKeyring ..." (with optional leading article)
keyring.go:37:2: struct field defaultTtl should be defaultTTL
keyring.go:50:20: method Id should be ID
keyring.go:96:1: comment on exported function SessionKeyring should be of the form "SessionKeyring ..."
keyring.go:101:1: comment on exported function UserSessionKeyring should be of the form "UserSessionKeyring ..."
keyring.go:107:1: comment on exported function GroupKeyring should be of the form "GroupKeyring ..."
keyring.go:112:1: comment on exported function ThreadKeyring should be of the form "ThreadKeyring ..."
keyring.go:117:1: comment on exported function ProcessKeyring should be of the form "ProcessKeyring ..."
keyring.go:122:1: comment on exported function CreateKeyring should be of the form "CreateKeyring ..."
keyring.go:132:2: var parentId should be parentID
keyring.go:155:1: comment on exported function OpenKeyring should be of the form "OpenKeyring ..."
keyring.go:158:2: var parentId should be parentID
keyring.go:171:1: comment on exported function SetKeyringTTL should be of the form "SetKeyringTTL ..."
keyring.go:192:1: comment on exported function UnlinkKeyring should be of the form "UnlinkKeyring ..."
perms.go:9:2: exported const PermOtherView should have comment (or a comment on this block) or be unexported
perms.go:18:2: exported const PermGroupView should have comment (or a comment on this block) or be unexported
perms.go:27:2: exported const PermUserView should have comment (or a comment on this block) or be unexported
perms.go:36:2: exported const PermProcessView should have comment (or a comment on this block) or be unexported
perms.go:45:2: exported const PermOtherAll should have comment (or a comment on this block) or be unexported
perms.go:69:1: comment on exported method KeyPerm.Process should be of the form "Process ..."
perms.go:74:1: comment on exported method KeyPerm.Group should be of the form "Group ..."
perms.go:79:1: comment on exported method KeyPerm.User should be of the form "User ..."
perms.go:84:1: comment on exported method KeyPerm.Other should be of the form "Other ..."
perms.go:93:1: comment on exported function Chown should be of the form "Chown ..."
perms.go:100:1: comment on exported function Chgrp should be of the form "Chgrp ..."
perms.go:107:1: comment on exported function SetPerm should be of the form "SetPerm ..."
reader.go:32:1: comment on exported function NewReader should be of the form "NewReader ..."
reader.go:38:1: comment on exported function OpenReader should be of the form "OpenReader ..."
ref.go:11:2: comment on exported var ErrUnsupportedKeyType should be of the form "ErrUnsupportedKeyType ..."
ref.go:14:2: comment on exported var ErrInvalidReference should be of the form "ErrInvalidReference ..."
ref.go:23:2: struct field Id should be ID
ref.go:29:1: comment on exported type Info should be of the form "Info ..." (with optional leading article)
ref.go:32:2: struct field Uid should be UID
ref.go:72:1: comment on exported method Info.Permissions should be of the form "Permissions ..."
ref.go:76:9: if block ends with a return statement, so drop this else and outdent its block
ref.go:85:1: comment on exported method Reference.Info should be of the form "Info ..."
ref.go:96:1: comment on exported method Info.Valid should be of the form "Valid ..."
ref.go:101:1: comment on exported method Reference.Valid should be of the form "Valid ..."
ref.go:110:1: comment on exported method Reference.Get should be of the form "Get ..."
ref.go:142:1: comment on exported function ListKeyring should be of the form "ListKeyring ..."
sys_linux.go:10:6: type keyId should be keyID
sys_linux.go:23:2: const keyctlGetKeyringId should be keyctlGetKeyringID
sys_linux.go:44:17: method Id should be ID
sys_linux.go:88:6: don't use underscores in Go names; func keyctl_SetTimeout should be keyctlSetTimeout
sys_linux.go:96:6: don't use underscores in Go names; func keyctl_Read should be keyctlRead
sys_linux.go:105:6: don't use underscores in Go names; func keyctl_Link should be keyctlLink
sys_linux.go:113:6: don't use underscores in Go names; func keyctl_Unlink should be keyctlUnlink
sys_linux.go:121:6: don't use underscores in Go names; func keyctl_Chown should be keyctlChown
sys_linux.go:129:6: don't use underscores in Go names; func keyctl_SetPerm should be keyctlSetPerm
sys_linux.go:137:6: don't use underscores in Go names; func add_key should be addKey
sys_linux.go:228:6: func describeKeyId should be describeKeyID
sys_linux_arm.go:4:2: don't use underscores in Go names; const syscall_keyctl should be syscallKeyctl
sys_linux_arm.go:5:2: don't use underscores in Go names; const syscall_add_key should be syscallAddKey
sys_linux_arm.go:6:2: don't use underscores in Go names; const syscall_setfsgid should be syscallSetfsgid
writer.go:9:6: exported type Flusher should have comment or be unexported
writer.go:15:1: comment on exported var ErrStreamClosed should be of the form "ErrStreamClosed ..."
writer.go:61:1: comment on exported function NewWriter should be of the form "NewWriter ..."
writer.go:67:1: comment on exported function CreateWriter should be of the form "CreateWriter ..."
@vodolaz095
Copy link
Author

vodolaz095 commented Oct 14, 2021

i'll try to make PR fixing this issues this week and improving documentation for this module

@vodolaz095
Copy link
Author

#10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant