Merge pull request #14 from guilyx/master

Fixed typo
This commit is contained in:
Fabian Weber 2020-08-07 18:51:53 +02:00 committed by GitHub
commit b3763be73e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -303,7 +303,7 @@ func (e *AttributeEncoder) Encode(attribute string, value interface{}) error {
} }
} }
default: default:
return fmt.Errorf("type %T is not supportet", value) return fmt.Errorf("type %T is not supported", value)
} }
return nil return nil

View File

@ -393,6 +393,7 @@ var (
AttributeNumberUp: TagInteger, AttributeNumberUp: TagInteger,
AttributeOrientationRequested: TagEnum, AttributeOrientationRequested: TagEnum,
AttributePPDName: TagName, AttributePPDName: TagName,
AttributeNumberOfDocuments: TagInteger,
AttributePrintQuality: TagEnum, AttributePrintQuality: TagEnum,
AttributePrinterErrorPolicy: TagName, AttributePrinterErrorPolicy: TagName,
AttributePrinterInfo: TagText, AttributePrinterInfo: TagText,
@ -401,7 +402,7 @@ var (
AttributePrinterLocation: TagText, AttributePrinterLocation: TagText,
AttributePrinterResolution: TagResolution, AttributePrinterResolution: TagResolution,
AttributePrinterState: TagEnum, AttributePrinterState: TagEnum,
AttributePrinterStateReason: TagKeyword, AttributePrinterStateReasons: TagKeyword,
AttributePrinterURI: TagUri, AttributePrinterURI: TagUri,
AttributePurgeJobs: TagBoolean, AttributePurgeJobs: TagBoolean,
AttributeRequestedAttributes: TagKeyword, AttributeRequestedAttributes: TagKeyword,

View File

@ -167,7 +167,7 @@ func (c *CUPSClient) CreatePrinter(name, deviceURI, ppd string, shared bool, err
req.OperationAttributes[AttributePrinterURI] = c.getPrinterUri(name) req.OperationAttributes[AttributePrinterURI] = c.getPrinterUri(name)
req.OperationAttributes[AttributePPDName] = ppd req.OperationAttributes[AttributePPDName] = ppd
req.OperationAttributes[AttributePrinterIsShared] = shared req.OperationAttributes[AttributePrinterIsShared] = shared
req.PrinterAttributes[AttributePrinterStateReason] = "none" req.PrinterAttributes[AttributePrinterStateReasons] = "none"
req.PrinterAttributes[AttributeDeviceURI] = deviceURI req.PrinterAttributes[AttributeDeviceURI] = deviceURI
req.PrinterAttributes[AttributePrinterInfo] = information req.PrinterAttributes[AttributePrinterInfo] = information
req.PrinterAttributes[AttributePrinterLocation] = location req.PrinterAttributes[AttributePrinterLocation] = location