Preparing report...

Report for github.com/coreos/torus

A+    Excellent!    Found 59 issues across 105 files

Tweet

gofmt95%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo94%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

    • torus/file.go
    • Line 138: warning: cyclomatic complexity 21 of function (*File).WriteAt() is high (> 15) (gocyclo)

golint46%

Golint is a linter for Go source code.

    • torus/cmd/torusblk/flex.go
    • Line 21: warning: exported type VolumeData should have comment or be unexported (golint)
    • Line 31: warning: exported type Response should have comment or be unexported (golint)
    • torus/block/aoe/interface.go
    • Line 9: warning: comment on exported type Interface should be of the form "Interface ..." (with optional leading article) (golint)
    • Line 15: warning: exported function NewInterface should have comment or be unexported (golint)
    • torus/internal/flagconfig/flagconfig.go
    • Line 1: warning: package comment should be of the form "Package flagconfig ..." (golint)
    • Line 42: warning: exported function AddConfigFlags should have comment or be unexported (golint)
    • Line 68: warning: exported function LoadConfigFile should have comment or be unexported (golint)
    • Line 82: warning: exported function BuildConfigFromFlags should have comment or be unexported (golint)
    • torus/distributor/protocols/tdp/client.go
    • Line 32: warning: exported type Conn should have comment or be unexported (golint)
    • Line 42: warning: exported function Dial should have comment or be unexported (golint)
    • Line 81: warning: exported method Conn.Block should have comment or be unexported (golint)
    • Line 109: warning: exported method Conn.PutBlock should have comment or be unexported (golint)
    • Line 136: warning: exported method Conn.RebalanceCheck should have comment or be unexported (golint)
    • Line 175: warning: exported method Conn.BlockSize should have comment or be unexported (golint)
    • Line 179: warning: exported method Conn.Err should have comment or be unexported (golint)
    • Line 183: warning: exported method Conn.WriteBuf should have comment or be unexported (golint)
    • Line 187: warning: exported method Conn.Close should have comment or be unexported (golint)
    • torus/storage/mmap_file.go
    • Line 11: warning: exported type MFile should have comment or be unexported (golint)
    • Line 17: warning: exported function CreateOrOpenMFile should have comment or be unexported (golint)
    • Line 35: warning: exported function CreateMFile should have comment or be unexported (golint)
    • Line 44: warning: exported function OpenMFile should have comment or be unexported (golint)
    • Line 108: warning: exported method MFile.Flush should have comment or be unexported (golint)
    • Line 112: warning: exported method MFile.Close should have comment or be unexported (golint)
    • torus/gc/null.go
    • Line 8: warning: exported type NullGC should have comment or be unexported (golint)
    • Line 10: warning: exported method NullGC.PrepVolume should have comment or be unexported (golint)
    • Line 11: warning: exported method NullGC.IsDead should have comment or be unexported (golint)
    • Line 12: warning: exported method NullGC.Clear should have comment or be unexported (golint)
    • torus/blockset/blockset_main.go
    • Line 1: warning: package comment should be of the form "Package blockset ..." (golint)
    • Line 80: warning: exported function UnmarshalFromProto should have comment or be unexported (golint)
    • Line 102: warning: exported function CreateBlocksetFromSpec should have comment or be unexported (golint)
    • Line 119: warning: exported function ParseBlockLayerKind should have comment or be unexported (golint)
    • Line 133: warning: exported function ParseBlockLayerSpec should have comment or be unexported (golint)
    • Line 154: warning: exported function MustParseBlockLayerSpec should have comment or be unexported (golint)
    • torus/cmd/ringtool/ringtool.go
    • Line 33: warning: exported type ClusterState should have comment or be unexported (golint)
    • Line 35: warning: exported type RebalanceStats should have comment or be unexported (golint)
    • Line 185: warning: exported method ClusterState.Rebalance should have comment or be unexported (golint)
    • torus/distributor/protocols/tdp/tdp.go
    • Line 36: warning: exported type Server should have comment or be unexported (golint)
    • Line 46: warning: exported type Handler should have comment or be unexported (golint)
    • Line 55: warning: exported function Serve should have comment or be unexported (golint)
    • Line 69: warning: exported method Server.ListenAddr should have comment or be unexported (golint)
    • Line 229: warning: exported method Server.Close should have comment or be unexported (golint)
    • torus/cmd/torusctl/table.go
    • Line 10: warning: exported type TableWriter should have comment or be unexported (golint)
    • Line 16: warning: exported function NewTableWriter should have comment or be unexported (golint)
    • Line 22: warning: exported method TableWriter.Render should have comment or be unexported (golint)
    • Line 35: warning: exported method TableWriter.RenderCSV should have comment or be unexported (golint)
    • Line 41: warning: exported method TableWriter.Append should have comment or be unexported (golint)
    • Line 45: warning: exported method TableWriter.SetHeader should have comment or be unexported (golint)
    • torus/block/aoe/device.go
    • Line 17: warning: exported type Device should have comment or be unexported (golint)
    • Line 85: warning: exported type FileDevice should have comment or be unexported (golint)
    • Line 89: warning: exported method FileDevice.Sectors should have comment or be unexported (golint)
    • Line 98: warning: exported method FileDevice.Identify should have comment or be unexported (golint)
    • torus/cliconfig/config.go
    • Line 3: warning: exported type TorusConfig should have comment or be unexported (golint)
    • Line 7: warning: don't use underscores in Go names; type Etcd_config should be EtcdConfig (golint)
    • Line 7: warning: exported type Etcd_config should have comment or be unexported (golint)
    • torus/cmd/torusd/main.go
    • Line 138: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 211: warning: should omit values from range; this loop is equivalent to `for range ...` (golint)
    • torus/distributor/distributor.go
    • Line 1: warning: package comment should be of the form "Package distributor ..." (golint)
    • Line 21: warning: exported type Distributor should have comment or be unexported (golint)
    • Line 73: warning: exported method Distributor.UUID should have comment or be unexported (golint)
    • Line 77: warning: exported method Distributor.Ring should have comment or be unexported (golint)
    • Line 83: warning: exported method Distributor.Close should have comment or be unexported (golint)
    • torus/internal/nbd/nbd.go
    • Line 21: warning: comment on exported const BLKROSET should be of the form "BLKROSET ..." (golint)
    • Line 82: warning: exported type NBD should have comment or be unexported (golint)
    • Line 92: warning: exported function Create should have comment or be unexported (golint)
    • Line 105: warning: comment on exported method NBD.IsConnected should be of the form "IsConnected ..." (golint)
    • Line 110: warning: exported method NBD.Size should have comment or be unexported (golint)
    • Line 114: warning: exported method NBD.SetSize should have comment or be unexported (golint)
    • Line 125: warning: exported method NBD.SetBlockSize should have comment or be unexported (golint)
    • Line 136: warning: exported function FindDevice should have comment or be unexported (golint)
    • Line 152: warning: exported method NBD.OpenDevice should have comment or be unexported (golint)
    • Line 174: warning: exported method NBD.Serve should have comment or be unexported (golint)
    • Line 249: warning: exported function Detach should have comment or be unexported (golint)
    • Line 259: warning: exported method NBD.Disconnect should have comment or be unexported (golint)
    • Line 398: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • torus/distributor/storage.go
    • Line 13: warning: exported var ErrNoPeersBlock should have comment or be unexported (golint)
    • Line 16: warning: exported method Distributor.GetBlock should have comment or be unexported (golint)
    • Line 174: warning: exported method Distributor.WriteBlock should have comment or be unexported (golint)
    • Line 240: warning: exported method Distributor.WriteBuf should have comment or be unexported (golint)
    • Line 244: warning: exported method Distributor.HasBlock should have comment or be unexported (golint)
    • Line 248: warning: exported method Distributor.DeleteBlock should have comment or be unexported (golint)
    • Line 252: warning: exported method Distributor.NumBlocks should have comment or be unexported (golint)
    • Line 258: warning: exported method Distributor.UsedBlocks should have comment or be unexported (golint)
    • Line 264: warning: exported method Distributor.BlockIterator should have comment or be unexported (golint)
    • Line 268: warning: exported method Distributor.Flush should have comment or be unexported (golint)
    • Line 272: warning: exported method Distributor.Kind should have comment or be unexported (golint)
    • Line 274: warning: exported method Distributor.BlockSize should have comment or be unexported (golint)
    • torus/gc/gc.go
    • Line 1: warning: package comment should be of the form "Package gc ..." (golint)
    • Line 19: warning: exported type GC should have comment or be unexported (golint)
    • Line 25: warning: exported type INodeFetcher should have comment or be unexported (golint)
    • Line 29: warning: exported function NewGCController should have comment or be unexported (golint)
    • Line 72: warning: exported type CreateGCFunc should have comment or be unexported (golint)
    • Line 76: warning: exported function RegisterGC should have comment or be unexported (golint)
    • torus/distributor/protocols/protocols.go
    • Line 1: warning: package comment should be of the form "Package protocols ..." (golint)
    • Line 15: warning: exported type RPC should have comment or be unexported (golint)
    • Line 25: warning: exported type RPCServer should have comment or be unexported (golint)
    • Line 29: warning: exported type RPCDialerFunc should have comment or be unexported (golint)
    • Line 30: warning: exported type RPCListenerFunc should have comment or be unexported (golint)
    • Line 35: warning: exported function RegisterRPCListener should have comment or be unexported (golint)
    • Line 47: warning: exported function ListenRPC should have comment or be unexported (golint)
    • Line 55: warning: exported function RegisterRPCDialer should have comment or be unexported (golint)
    • Line 67: warning: exported function DialRPC should have comment or be unexported (golint)
    • torus/metadata/temp/temp.go
    • Line 21: warning: exported type Server should have comment or be unexported (golint)
    • Line 38: warning: exported type Client should have comment or be unexported (golint)
    • Line 45: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 65: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 73: warning: exported function NewTemp should have comment or be unexported (golint)
    • Line 77: warning: exported method Client.Kind should have comment or be unexported (golint)
    • Line 81: warning: exported method Client.GlobalMetadata should have comment or be unexported (golint)
    • Line 85: warning: exported method Client.UUID should have comment or be unexported (golint)
    • Line 89: warning: exported method Client.GetLease should have comment or be unexported (golint)
    • Line 90: warning: exported method Client.RenewLease should have comment or be unexported (golint)
    • Line 91: warning: exported method Client.GetLockStatus should have comment or be unexported (golint)
    • Line 93: warning: exported method Client.GetPeers should have comment or be unexported (golint)
    • Line 101: warning: exported method Client.RegisterPeer should have comment or be unexported (golint)
    • Line 114: warning: exported method Client.NewVolumeID should have comment or be unexported (golint)
    • Line 122: warning: exported method Client.CommitINodeIndex should have comment or be unexported (golint)
    • Line 130: warning: exported method Client.GetVolumes should have comment or be unexported (golint)
    • Line 142: warning: exported method Client.CreateVolume should have comment or be unexported (golint)
    • Line 148: warning: exported method Client.GetVolume should have comment or be unexported (golint)
    • Line 155: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 158: warning: exported method Client.GetRing should have comment or be unexported (golint)
    • Line 164: warning: exported method Client.SubscribeNewRings should have comment or be unexported (golint)
    • Line 168: warning: exported method Client.UnsubscribeNewRings should have comment or be unexported (golint)
    • Line 172: warning: exported method Server.SubscribeNewRings should have comment or be unexported (golint)
    • Line 178: warning: exported method Server.UnsubscribeNewRings should have comment or be unexported (golint)
    • Line 190: warning: exported method Client.Close should have comment or be unexported (golint)
    • Line 196: warning: exported method Client.SetRing should have comment or be unexported (golint)
    • Line 200: warning: exported method Server.SetRing should have comment or be unexported (golint)
    • Line 213: warning: exported method Client.GetINodeIndex should have comment or be unexported (golint)
    • Line 219: warning: exported method Client.GetINodeIndexes should have comment or be unexported (golint)
    • Line 229: warning: exported method Server.Close should have comment or be unexported (golint)
    • Line 233: warning: exported method Client.WithContext should have comment or be unexported (golint)
    • Line 237: warning: exported method Client.LockData should have comment or be unexported (golint)
    • Line 241: warning: exported method Client.UnlockData should have comment or be unexported (golint)
    • Line 245: warning: exported method Client.GetData should have comment or be unexported (golint)
    • Line 250: warning: exported method Client.SetData should have comment or be unexported (golint)
    • Line 254: warning: exported method Client.DeleteVolume should have comment or be unexported (golint)
    • torus/distributor/rpc.go
    • Line 9: warning: exported method Distributor.Block should have comment or be unexported (golint)
    • Line 23: warning: exported method Distributor.PutBlock should have comment or be unexported (golint)
    • Line 52: warning: exported method Distributor.RebalanceCheck should have comment or be unexported (golint)
    • torus/inode.go
    • Line 29: warning: exported type INodeStore should have comment or be unexported (golint)
    • Line 34: warning: exported function NewINodeStore should have comment or be unexported (golint)
    • Line 40: warning: exported method INodeStore.Flush should have comment or be unexported (golint)
    • Line 41: warning: exported method INodeStore.Close should have comment or be unexported (golint)
    • Line 45: warning: exported method INodeStore.WriteINode should have comment or be unexported (golint)
    • Line 83: warning: exported method INodeStore.GetINode should have comment or be unexported (golint)
    • Line 132: warning: exported method INodeStore.DeleteINode should have comment or be unexported (golint)
    • Line 161: warning: exported method INodeStore.INodeIterator should have comment or be unexported (golint)
    • Line 166: warning: exported type INodeIterator should have comment or be unexported (golint)
    • Line 170: warning: exported method INodeIterator.Err should have comment or be unexported (golint)
    • Line 171: warning: exported method INodeIterator.Next should have comment or be unexported (golint)
    • Line 181: warning: exported method INodeIterator.INodeRef should have comment or be unexported (golint)
    • Line 185: warning: exported method INodeIterator.Close should have comment or be unexported (golint)
    • torus/block/blockfile.go
    • Line 9: warning: exported type BlockFile should have comment or be unexported (golint)
    • Line 14: warning: exported method BlockVolume.OpenBlockFile should have comment or be unexported (golint)
    • Line 50: warning: exported method BlockVolume.OpenSnapshot should have comment or be unexported (golint)
    • Line 88: warning: exported method BlockVolume.RestoreSnapshot should have comment or be unexported (golint)
    • Line 114: warning: exported method BlockFile.Close should have comment or be unexported (golint)
    • Line 134: warning: exported method BlockFile.Sync should have comment or be unexported (golint)
    • torus/metadata/etcd/etcd.go
    • Line 28: warning: exported const KeyPrefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 59: warning: exported type Etcd should have comment or be unexported (golint)
    • Line 115: warning: exported method Etcd.Close should have comment or be unexported (golint)
    • Line 145: warning: exported method Etcd.WithContext should have comment or be unexported (golint)
    • Line 152: warning: exported method Etcd.SubscribeNewRings should have comment or be unexported (golint)
    • Line 158: warning: exported method Etcd.UnsubscribeNewRings should have comment or be unexported (golint)
    • Line 170: warning: receiver name c should be consistent with previous receiver name e for etcdCtx (golint)
    • Line 177: warning: receiver name c should be consistent with previous receiver name e for etcdCtx (golint)
    • Line 181: warning: receiver name c should be consistent with previous receiver name e for etcdCtx (golint)
    • Line 185: warning: receiver name c should be consistent with previous receiver name e for etcdCtx (golint)
    • Line 189: warning: receiver name c should be consistent with previous receiver name e for etcdCtx (golint)
    • Line 193: warning: receiver name c should be consistent with previous receiver name e for etcdCtx (golint)
    • Line 210: warning: receiver name c should be consistent with previous receiver name e for etcdCtx (golint)
    • Line 243: warning: receiver name c should be consistent with previous receiver name e for etcdCtx (golint)
    • Line 285: warning: exported function BytesAddOne should have comment or be unexported (golint)
    • Line 290: warning: receiver name c should be consistent with previous receiver name e for etcdCtx (golint)
    • Line 314: warning: receiver name c should be consistent with previous receiver name e for etcdCtx (golint)
    • Line 325: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 334: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 346: warning: receiver name c should be consistent with previous receiver name e for etcdCtx (golint)
    • Line 358: warning: receiver name c should be consistent with previous receiver name e for etcdCtx (golint)
    • Line 367: warning: receiver name c should be consistent with previous receiver name e for etcdCtx (golint)
    • Line 379: warning: receiver name c should be consistent with previous receiver name e for etcdCtx (golint)
    • Line 383: warning: receiver name c should be consistent with previous receiver name e for etcdCtx (golint)
    • Line 399: warning: receiver name c should be consistent with previous receiver name e for etcdCtx (golint)
    • Line 403: warning: receiver name c should be consistent with previous receiver name e for etcdCtx (golint)
    • Line 407: warning: receiver name c should be consistent with previous receiver name e for etcdCtx (golint)
    • Line 435: warning: receiver name c should be consistent with previous receiver name e for etcdCtx (golint)
    • Line 447: warning: receiver name c should be consistent with previous receiver name e for etcdCtx (golint)
    • Line 458: warning: receiver name c should be consistent with previous receiver name e for etcdCtx (golint)
    • torus/block/aoe/frame.go
    • Line 11: warning: exported type Frame should have comment or be unexported (golint)
    • Line 18: warning: exported method Frame.UnmarshalBinary should have comment or be unexported (golint)
    • Line 30: warning: exported type WriterTo should have comment or be unexported (golint)
    • Line 34: warning: exported type FrameSender should have comment or be unexported (golint)
    • Line 44: warning: exported method FrameSender.Send should have comment or be unexported (golint)
    • Line 74: warning: exported method FrameSender.SendError should have comment or be unexported (golint)
    • torus/distributor/rebalance/rebalancer.go
    • Line 1: warning: package comment should be of the form "Package rebalance ..." (golint)
    • Line 16: warning: exported type Ringer should have comment or be unexported (golint)
    • Line 21: warning: exported type Rebalancer should have comment or be unexported (golint)
    • Line 28: warning: exported type CheckAndSender should have comment or be unexported (golint)
    • Line 33: warning: exported function NewRebalancer should have comment or be unexported (golint)
    • torus/internal/http/api.go
    • Line 12: warning: exported type Server should have comment or be unexported (golint)
    • Line 18: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 39: warning: exported function ServeHTTP should have comment or be unexported (golint)
    • Line 43: warning: exported method Server.Run should have comment or be unexported (golint)
    • torus/ring.go
    • Line 9: warning: exported type RingType should have comment or be unexported (golint)
    • Line 11: warning: exported type Ring should have comment or be unexported (golint)
    • Line 22: warning: exported type ModifyableRing should have comment or be unexported (golint)
    • Line 26: warning: exported type RingAdder should have comment or be unexported (golint)
    • Line 31: warning: exported type RingRemover should have comment or be unexported (golint)
    • Line 36: warning: exported type PeerPermutation should have comment or be unexported (golint)
    • Line 41: warning: exported type PeerList should have comment or be unexported (golint)
    • Line 43: warning: exported method PeerList.IndexAt should have comment or be unexported (golint)
    • Line 52: warning: exported method PeerList.Has should have comment or be unexported (golint)
    • Line 56: warning: exported method PeerList.AndNot should have comment or be unexported (golint)
    • Line 66: warning: exported method PeerList.Union should have comment or be unexported (golint)
    • Line 79: warning: exported method PeerList.Intersect should have comment or be unexported (golint)
    • Line 91: warning: exported type PeerInfoList should have comment or be unexported (golint)
    • Line 93: warning: exported method PeerInfoList.UUIDAt should have comment or be unexported (golint)
    • Line 102: warning: exported method PeerInfoList.HasUUID should have comment or be unexported (golint)
    • Line 106: warning: exported method PeerInfoList.AndNot should have comment or be unexported (golint)
    • Line 116: warning: exported method PeerInfoList.Union should have comment or be unexported (golint)
    • Line 129: warning: exported method PeerInfoList.Intersect should have comment or be unexported (golint)
    • Line 139: warning: exported method PeerInfoList.PeerList should have comment or be unexported (golint)
    • Line 147: warning: exported method PeerInfoList.GetWeights should have comment or be unexported (golint)
    • torus/ring/ring_main.go
    • Line 1: warning: package comment should be of the form "Package ring ..." (golint)
    • Line 15: warning: exported const Empty should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: exported function Unmarshal should have comment or be unexported (golint)
    • Line 58: warning: exported function CreateRing should have comment or be unexported (golint)
    • Line 62: warning: exported function RingTypeFromString should have comment or be unexported (golint)
    • torus/heartbeat.go
    • Line 95: warning: exported method Server.AddTimeoutCallback should have comment or be unexported (golint)
    • Line 155: warning: exported method Server.UpdatePeerMap should have comment or be unexported (golint)
    • Line 160: warning: exported method Server.UpdateRebalanceInfo should have comment or be unexported (golint)
    • torus/local_server.go
    • Line 10: warning: exported function MkdirsFor should have comment or be unexported (golint)
    • Line 29: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 49: warning: exported function NewMemoryServer should have comment or be unexported (golint)
    • Line 60: warning: exported function NewServerByImpl should have comment or be unexported (golint)
    • torus/block/aoe/aoe.go
    • Line 1: warning: package comment should be of the form "Package aoe ..." (golint)
    • Line 26: warning: exported type Server should have comment or be unexported (golint)
    • Line 116: warning: exported method Server.Serve should have comment or be unexported (golint)
    • Line 256: warning: exported method Server.Close should have comment or be unexported (golint)
    • torus/metadata/common.go
    • Line 1: warning: package comment should be of the form "Package metadata ..." (golint)
    • Line 14: warning: exported function MakeUUID should have comment or be unexported (golint)
    • Line 18: warning: comment on exported function GetUUID should be of the form "GetUUID ..." (golint)
    • torus/storage.go
    • Line 15: warning: exported var BlockLog should have comment or be unexported (golint)
    • Line 27: warning: exported type BlockType should have comment or be unexported (golint)
    • Line 31: warning: exported const TypeBlock should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: exported const VolumeMax should have comment (or a comment on this block) or be unexported (golint)
    • Line 53: warning: exported method INodeRef.Equals should have comment or be unexported (golint)
    • Line 57: warning: exported method INodeRef.Volume should have comment or be unexported (golint)
    • Line 61: warning: exported method VolumeID.ToBytes should have comment or be unexported (golint)
    • Line 72: warning: exported method INodeRef.ToProto should have comment or be unexported (golint)
    • Line 79: warning: exported function NewINodeRef should have comment or be unexported (golint)
    • Line 87: warning: exported const VolumeIDByteSize should have comment or be unexported (golint)
    • Line 88: warning: exported const INodeRefByteSize should have comment or be unexported (golint)
    • Line 90: warning: exported method INodeRef.ToBytes should have comment or be unexported (golint)
    • Line 99: warning: exported function INodeRefFromBytes should have comment or be unexported (golint)
    • Line 113: warning: exported const BlockRefByteSize should have comment or be unexported (golint)
    • Line 115: warning: exported method BlockRef.ToBytes should have comment or be unexported (golint)
    • Line 121: warning: exported method BlockRef.ToBytesBuf should have comment or be unexported (golint)
    • Line 128: warning: exported function BlockRefFromBytes should have comment or be unexported (golint)
    • Line 144: warning: exported method BlockRef.ToProto should have comment or be unexported (golint)
    • Line 152: warning: exported function BlockFromProto should have comment or be unexported (golint)
    • Line 162: warning: exported function INodeFromProto should have comment or be unexported (golint)
    • Line 169: warning: exported method BlockRef.HasINode should have comment or be unexported (golint)
    • Line 173: warning: exported method BlockRef.BlockType should have comment or be unexported (golint)
    • Line 177: warning: exported method BlockRef.SetBlockType should have comment or be unexported (golint)
    • Line 181: warning: exported method BlockRef.IsZero should have comment or be unexported (golint)
    • Line 185: warning: exported function ZeroBlock should have comment or be unexported (golint)
    • Line 189: warning: exported function ZeroINode should have comment or be unexported (golint)
    • Line 193: warning: exported type ReadLevel should have comment or be unexported (golint)
    • Line 194: warning: exported type WriteLevel should have comment or be unexported (golint)
    • Line 197: warning: exported const WriteAll should have comment (or a comment on this block) or be unexported (golint)
    • Line 202: warning: exported function ParseWriteLevel should have comment or be unexported (golint)
    • Line 217: warning: exported const ReadBlock should have comment (or a comment on this block) or be unexported (golint)
    • Line 222: warning: exported function ParseReadLevel should have comment or be unexported (golint)
    • Line 252: warning: exported type BlockIterator should have comment or be unexported (golint)
    • Line 259: warning: exported type NewBlockStoreFunc should have comment or be unexported (golint)
    • Line 263: warning: exported function RegisterBlockStore should have comment or be unexported (golint)
    • Line 275: warning: exported function CreateBlockStore should have comment or be unexported (golint)
    • torus/metadata/etcd/helpers.go
    • Line 10: warning: exported function MkKey should have comment or be unexported (golint)
    • Line 15: warning: exported function Uint64ToBytes should have comment or be unexported (golint)
    • Line 24: warning: exported function BytesToUint64 should have comment or be unexported (golint)
    • Line 34: warning: exported function Uint64ToHex should have comment or be unexported (golint)
    • torus/internal/nbd/nbdserver.go
    • Line 35: warning: exported type DeviceFinder should have comment or be unexported (golint)
    • Line 40: warning: exported type NBDServer should have comment or be unexported (golint)
    • Line 45: warning: exported function NewNBDServer should have comment or be unexported (golint)
    • Line 64: warning: exported method NBDServer.Serve should have comment or be unexported (golint)
    • Line 89: warning: exported method NBDServer.Close should have comment or be unexported (golint)
    • Line 98: warning: exported type NBDConn should have comment or be unexported (golint)
    • Line 314: warning: exported method NBDConn.Close should have comment or be unexported (golint)
    • torus/blockset.go
    • Line 47: warning: exported type BlockLayerKind should have comment or be unexported (golint)
    • Line 49: warning: exported type BlockLayer should have comment or be unexported (golint)
    • Line 54: warning: exported type BlockLayerSpec should have comment or be unexported (golint)
    • Line 56: warning: exported function MarshalBlocksetToProto should have comment or be unexported (golint)
    • torus/server.go
    • Line 25: warning: exported const CtxWriteLevel should have comment (or a comment on this block) or be unexported (golint)
    • Line 65: warning: exported method Server.Lease should have comment or be unexported (golint)
    • Line 71: warning: exported method Server.Close should have comment or be unexported (golint)
    • Line 109: warning: exported method Server.ExtendContext should have comment or be unexported (golint)
    • Line 110: warning: should not use basic type int as key in context.WithValue (golint)
    • Line 111: warning: should not use basic type int as key in context.WithValue (golint)
    • Line 115: warning: exported method Server.GetPeerMap should have comment or be unexported (golint)
    • torus/distributor/protocols/tdp/tdp_test.go
    • Line 234: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 415: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 455: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • torus/block/volume.go
    • Line 10: warning: exported const VolumeType should have comment or be unexported (golint)
    • Line 12: warning: exported type BlockVolume should have comment or be unexported (golint)
    • Line 18: warning: exported function CreateBlockVolume should have comment or be unexported (golint)
    • Line 35: warning: exported function OpenBlockVolume should have comment or be unexported (golint)
    • Line 51: warning: exported function DeleteBlockVolume should have comment or be unexported (golint)
    • Line 63: warning: exported method BlockVolume.SaveSnapshot should have comment or be unexported (golint)
    • Line 64: warning: exported method BlockVolume.GetSnapshots should have comment or be unexported (golint)
    • Line 65: warning: exported method BlockVolume.DeleteSnapshot should have comment or be unexported (golint)
    • torus/file.go
    • Line 61: warning: exported type File should have comment or be unexported (golint)
    • Line 81: warning: exported method File.WriteOpen should have comment or be unexported (golint)
    • Line 85: warning: exported method File.Replaces should have comment or be unexported (golint)
    • Line 89: warning: exported method Server.CreateFile should have comment or be unexported (golint)
    • Line 138: warning: exported method File.WriteAt should have comment or be unexported (golint)
    • Line 258: warning: exported method File.ReadAt should have comment or be unexported (golint)
    • Line 295: warning: exported method File.Seek should have comment or be unexported (golint)
    • Line 312: warning: exported method File.Close should have comment or be unexported (golint)
    • Line 320: warning: exported method File.Truncate should have comment or be unexported (golint)
    • Line 351: warning: exported method File.SyncAllWrites should have comment or be unexported (golint)
    • Line 359: warning: exported method File.SyncINode should have comment or be unexported (golint)
    • Line 378: warning: exported method File.SyncBlocks should have comment or be unexported (golint)
    • Line 387: warning: exported method File.Size should have comment or be unexported (golint)
    • torus/metadata.go
    • Line 15: warning: exported type MetadataKind should have comment or be unexported (golint)
    • Line 18: warning: exported const EtcdMetadata should have comment (or a comment on this block) or be unexported (golint)
    • Line 58: warning: exported type DebugMetadataService should have comment or be unexported (golint)
    • Line 62: warning: exported type GlobalMetadata should have comment or be unexported (golint)
    • Line 126: warning: exported type WipeMDSFunc should have comment or be unexported (golint)
    • Line 144: warning: exported function WipeMDS should have comment or be unexported (golint)
    • Line 149: warning: exported type SetRingFunc should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell99%

Misspell Finds commonly misspelled English words