浏览代码

dns/dnsmessage: remove unused funcs skipText and skipBytes

Change-Id: Ie34e3ec7e83ac98181725238e0010ddb941174c7
Reviewed-on: https://go-review.googlesource.com/c/net/+/220457
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
Tobias Klauser 5 年之前
父节点
当前提交
5d076fcf07
共有 1 个文件被更改,包括 0 次插入19 次删除
  1. 0 19
      dns/dnsmessage/message.go

+ 0 - 19
dns/dnsmessage/message.go

@@ -1819,17 +1819,6 @@ func unpackText(msg []byte, off int) (string, int, error) {
 	return string(msg[beginOff:endOff]), endOff, nil
 	return string(msg[beginOff:endOff]), endOff, nil
 }
 }
 
 
-func skipText(msg []byte, off int) (int, error) {
-	if off >= len(msg) {
-		return off, errBaseLen
-	}
-	endOff := off + 1 + int(msg[off])
-	if endOff > len(msg) {
-		return off, errCalcLen
-	}
-	return endOff, nil
-}
-
 // packBytes appends the wire format of field to msg.
 // packBytes appends the wire format of field to msg.
 func packBytes(msg []byte, field []byte) []byte {
 func packBytes(msg []byte, field []byte) []byte {
 	return append(msg, field...)
 	return append(msg, field...)
@@ -1844,14 +1833,6 @@ func unpackBytes(msg []byte, off int, field []byte) (int, error) {
 	return newOff, nil
 	return newOff, nil
 }
 }
 
 
-func skipBytes(msg []byte, off int, field []byte) (int, error) {
-	newOff := off + len(field)
-	if newOff > len(msg) {
-		return off, errBaseLen
-	}
-	return newOff, nil
-}
-
 const nameLen = 255
 const nameLen = 255
 
 
 // A Name is a non-encoded domain name. It is used instead of strings to avoid
 // A Name is a non-encoded domain name. It is used instead of strings to avoid