
Security News
crates.io Ships Security Tab and Tightens Publishing Controls
crates.io adds a Security tab backed by RustSec advisories and narrows trusted publishing paths to reduce common CI publishing risks.
www.github.com/kdar/stringio.git
Advanced tools
A stringio library for Go (like the python StringIO). Forked from https://code.google.com/p/go-stringio/ and updated for Go 1.0.3.
StringIO is a low level library to mimic file I/O operations against buffers (memory). Not like File, it does not touch the filesystem at all. Best suit for testing infrastructure. Most language's standard library provides something similar to facilitate the buffer orientated IO operations, and this is an implementation for Go language.
Its quite straightforward.
package main
import "stringio"
func main() {
sio := stringio.New()
sio.WriteString("this is a test")
sio.Seek(0, 0)
out := sio.GetValueString()
println(out) // prints "this is a test"
}
StringIO struct implements the following interfaces:
io.ReadWriter, io.Closer, io.Seeker, io.ReadAt, io.WriteAt.
Most File I/O operations are supported, though there are a few exceptions. In most case, the are either invalid or unnecessary given there is no filesystem semantics in StringIO at all. They are:
Fd() - A StringIO has no file descriptor. It doesn't need one, calling StringIO's Fd() function will return (-1, errors.New("invalid"))
Stat() - StringIO has no semantics of file stats. It makes no less to implement a fake stats() call at least for now.
Dir and permission related calls, such as Chown, Chmod, Mkdir, etc... They are simply not unnecessary.
Linking/Renaming - Since StringIO has no filesystem representation, it makes no sense to implement linking and renaming at all, so no.
For more info, check out the test code. Most use cases for IO operations are tested and can be treated as examples.
FAQs
Unknown package
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
crates.io adds a Security tab backed by RustSec advisories and narrows trusted publishing paths to reduce common CI publishing risks.

Research
/Security News
A Chrome extension claiming to hide Amazon ads was found secretly hijacking affiliate links, replacing creators’ tags with its own without user consent.

Security News
A surge of AI-generated vulnerability reports has pushed open source maintainers to rethink bug bounties and tighten security disclosure processes.