MCPcopy
hub / github.com/bitfield/script / DecodeBase64

Method DecodeBase64

script.go:291–300  ·  view source on GitHub ↗

DecodeBase64 produces the string represented by the base64 encoded input.

()

Source from the content-addressed store, hash-verified

289
290// DecodeBase64 produces the string represented by the base64 encoded input.
291func (p *Pipe) DecodeBase64() *Pipe {
292 return p.Filter(func(r io.Reader, w io.Writer) error {
293 decoder := base64.NewDecoder(base64.StdEncoding, r)
294 _, err := io.Copy(w, decoder)
295 if err != nil {
296 return err
297 }
298 return nil
299 })
300}
301
302// Dirname reads paths from the pipe, one per line, and produces only the
303// parent directories of each path. For example, /usr/local/bin/foo would

Calls 1

FilterMethod · 0.95