mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-11-04 00:42:24 -06:00 
			
		
		
		
	[chore]: Bump github.com/abema/go-mp4 from 0.13.0 to 1.0.0 (#2222)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
		
					parent
					
						
							
								9f9fcf743d
							
						
					
				
			
			
				commit
				
					
						380d83f9a9
					
				
			
		
					 15 changed files with 16 additions and 15 deletions
				
			
		
							
								
								
									
										30
									
								
								vendor/github.com/abema/go-mp4/internal/util/io.go
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								vendor/github.com/abema/go-mp4/internal/util/io.go
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,30 @@
 | 
			
		|||
package util
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"bytes"
 | 
			
		||||
	"io"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func ReadString(r io.Reader) (string, error) {
 | 
			
		||||
	b := make([]byte, 1)
 | 
			
		||||
	buf := bytes.NewBuffer(nil)
 | 
			
		||||
	for {
 | 
			
		||||
		if _, err := r.Read(b); err != nil {
 | 
			
		||||
			return "", err
 | 
			
		||||
		}
 | 
			
		||||
		if b[0] == 0 {
 | 
			
		||||
			return buf.String(), nil
 | 
			
		||||
		}
 | 
			
		||||
		buf.Write(b)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func WriteString(w io.Writer, s string) error {
 | 
			
		||||
	if _, err := w.Write([]byte(s)); err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
	if _, err := w.Write([]byte{0}); err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
	}
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue