Skip to content

document relation to Go 1.24's os.Root APIs #2

@aktau

Description

@aktau

Go 1.24 introduces the os.Root family of file APIs: https://go.dev/blog/osroot (cc @neild). These APIs are resistant to path traversal.

If I'm understanding things correctly, this is a replacement for safeopen. It may be a good idea to:

  1. Recommend users who can use Go 1.24+ to use os.Root instead of safeopen.
  2. Reimplement safeopen on top of os.Root.
  3. Deprecate (or mark with inline me annotations) the safeopen functions to users can migrate once Go 1.24 is two releases old.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions