fix(go): mirror official Grok hooks
This commit is contained in:
1 parent
ed36743d77
commit
7fe99f7e5f
18 files changed
+2239
-640
No files matched your search
@@ -63,6 +63,14 @@ func prepareSourceChange(
|
||||
if !existed {
|
||||
original = nil
|
||||
}
|
||||
if !remove && int64(len(next)) > maxManagedSourceBytes {
|
||||
return nil, fmt.Errorf(
|
||||
"%s exceeds %d bytes: %s",
|
||||
label,
|
||||
maxManagedSourceBytes,
|
||||
filePath,
|
||||
)
|
||||
}
|
||||
snapshot, err := readManagedFile(filePath, label, maxManagedSourceBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in new issue
Block a user