1 Star 0 Fork 1

gzlwz/golang-pdfcpu

forked from Deeao/golang-pdfcpu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
repair.go 1.37 KB
一键复制 编辑 原始数据 按行查看 历史
liuweizhi 提交于 2024-12-10 16:33 +08:00 . fix: 全局替换module名称
/*
Copyright 2024 The pdfcpu Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package model
import (
"fmt"
"gitee.com/gzlwz/golang-pdfcpu/pkg/log"
)
func ReportSpecViolation(xRefTable *XRefTable, err error) {
// TODO Apply across code base.
pre := fmt.Sprintf("digesting spec violation around obj#(%d)", xRefTable.CurObj)
if log.DebugEnabled() {
log.Debug.Printf("%s: %v\n", pre, err)
}
if log.ReadEnabled() {
log.Read.Printf("%s: %v\n", pre, err)
}
if log.ValidateEnabled() {
log.Validate.Printf("%s: %v\n", pre, err)
}
if log.CLIEnabled() {
log.CLI.Printf("%s: %v\n", pre, err)
}
}
func ShowRepaired(msg string) {
msg = "repaired: " + msg
if log.DebugEnabled() {
log.Debug.Println("pdfcpu " + msg)
}
if log.ReadEnabled() {
log.Read.Println("pdfcpu " + msg)
}
if log.ValidateEnabled() {
log.Validate.Println("pdfcpu " + msg)
}
if log.CLIEnabled() {
log.CLI.Println(msg)
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/gzlwz/golang-pdfcpu.git
git@gitee.com:gzlwz/golang-pdfcpu.git
gzlwz
golang-pdfcpu
golang-pdfcpu
v0.0.2

搜索帮助