Skip to content

bytes/hash: rename to hash/maphash #34778

Closed
@rsc

Description

@rsc

The implementation landed for #28322, which is great (thanks!).
The choice of bytes/hash as the import path is probably not right.

Based on the discussion on #28322, it's not completely clear it will
stay limited to bytes for all time. Even if it did, it is unclear why it is
bytes/hash and not hash/bytes. Neither is great, since the package
name alone shadows either bytes or hash. As it is, the current
bytes/hash.Hash implements (non-bytes/)hash.Hash, which is
pretty confusing. Goimports won't know what to do for hash.Hash
anymore, and so on.

It seems like it should be either in package hash, with a clear name
(hash.Seeded? hash.Random?),
or else in a hash/something package with a clear name.

/cc @randall77 @bradfitz @alandonovan

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions