build: fix comments after golangci-lint upgrade

This commit is contained in:
Nick Craig-Wood 2024-11-11 17:54:59 +00:00
parent 1072173d58
commit 1317fdb9b8
3 changed files with 26 additions and 12 deletions

View File

@ -202,9 +202,14 @@ type SharingLinkType struct {
type LinkType string type LinkType string
const ( const (
ViewLinkType LinkType = "view" // ViewLinkType (role: read) A view-only sharing link, allowing read-only access. // ViewLinkType (role: read) A view-only sharing link, allowing read-only access.
EditLinkType LinkType = "edit" // EditLinkType (role: write) An edit sharing link, allowing read-write access. ViewLinkType LinkType = "view"
EmbedLinkType LinkType = "embed" // EmbedLinkType (role: read) A view-only sharing link that can be used to embed content into a host webpage. Embed links are not available for OneDrive for Business or SharePoint. // EditLinkType (role: write) An edit sharing link, allowing read-write access.
EditLinkType LinkType = "edit"
// EmbedLinkType (role: read) A view-only sharing link that can be used to embed
// content into a host webpage. Embed links are not available for OneDrive for
// Business or SharePoint.
EmbedLinkType LinkType = "embed"
) )
// LinkScope represents the scope of the link represented by this permission. // LinkScope represents the scope of the link represented by this permission.
@ -212,9 +217,12 @@ const (
type LinkScope string type LinkScope string
const ( const (
AnonymousScope LinkScope = "anonymous" // AnonymousScope = Anyone with the link has access, without needing to sign in. This may include people outside of your organization. // AnonymousScope = Anyone with the link has access, without needing to sign in.
OrganizationScope LinkScope = "organization" // OrganizationScope = Anyone signed into your organization (tenant) can use the link to get access. Only available in OneDrive for Business and SharePoint. // This may include people outside of your organization.
AnonymousScope LinkScope = "anonymous"
// OrganizationScope = Anyone signed into your organization (tenant) can use the
// link to get access. Only available in OneDrive for Business and SharePoint.
OrganizationScope LinkScope = "organization"
) )
// PermissionsType provides information about a sharing permission granted for a DriveItem resource. // PermissionsType provides information about a sharing permission granted for a DriveItem resource.
@ -236,10 +244,14 @@ type PermissionsType struct {
type Role string type Role string
const ( const (
ReadRole Role = "read" // ReadRole provides the ability to read the metadata and contents of the item. // ReadRole provides the ability to read the metadata and contents of the item.
WriteRole Role = "write" // WriteRole provides the ability to read and modify the metadata and contents of the item. ReadRole Role = "read"
OwnerRole Role = "owner" // OwnerRole represents the owner role for SharePoint and OneDrive for Business. // WriteRole provides the ability to read and modify the metadata and contents of the item.
MemberRole Role = "member" // MemberRole represents the member role for SharePoint and OneDrive for Business. WriteRole Role = "write"
// OwnerRole represents the owner role for SharePoint and OneDrive for Business.
OwnerRole Role = "owner"
// MemberRole represents the member role for SharePoint and OneDrive for Business.
MemberRole Role = "member"
) )
// PermissionsResponse is the response to the list permissions method // PermissionsResponse is the response to the list permissions method

View File

@ -66,7 +66,8 @@ func quotePath(path string) string {
return escapePath(path, true) return escapePath(path, true)
} }
var Colors bool // Colors controls whether terminal colors are enabled // Colors controls whether terminal colors are enabled
var Colors bool
// Color handles terminal colors for bisync // Color handles terminal colors for bisync
func Color(style string, s string) string { func Color(style string, s string) string {

View File

@ -17,7 +17,8 @@ import (
) )
const ( const (
BufferSize = 1024 * 1024 // BufferSize is the default size of the pages used in the reader // BufferSize is the default size of the pages used in the reader
BufferSize = 1024 * 1024
bufferCacheSize = 64 // max number of buffers to keep in cache bufferCacheSize = 64 // max number of buffers to keep in cache
bufferCacheFlushTime = 5 * time.Second // flush the cached buffers after this long bufferCacheFlushTime = 5 * time.Second // flush the cached buffers after this long
) )