mirror of
				https://github.com/StackExchange/dnscontrol.git
				synced 2024-05-11 05:55:12 +00:00 
			
		
		
		
	CHORE: Remove dead code: txtutil.SplitSingleLongTxt() and txtutil.Segment() (#2685)
This commit is contained in:
		@@ -1,20 +1,10 @@
 | 
			
		||||
package txtutil
 | 
			
		||||
 | 
			
		||||
// SplitSingleLongTxt does nothing.
 | 
			
		||||
// Deprecated: This is a no-op for backwards compatibility.
 | 
			
		||||
func SplitSingleLongTxt(records any) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ToChunks returns the string as chunks of 255-octet strings (the last string being the remainder).
 | 
			
		||||
func ToChunks(s string) []string {
 | 
			
		||||
	return splitChunks(s, 255)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Segment returns the string as 255-octet segments, the last being the remainder.
 | 
			
		||||
func Segment(s string) []string {
 | 
			
		||||
	return splitChunks(s, 255)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func splitChunks(buf string, lim int) []string {
 | 
			
		||||
	var chunk string
 | 
			
		||||
	chunks := make([]string, 0, len(buf)/lim+1)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user