Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
qmuntal committed Jan 12, 2019
1 parent bdaaec2 commit 907a36c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 30 deletions.
16 changes: 0 additions & 16 deletions part.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,6 @@ import (
"strings"
)

// CompressionOption is an enumerable for the different compression options.
type CompressionOption int

const (
// CompressionNone disables the compression.
CompressionNone CompressionOption = iota - 1
// CompressionNormal is optimized for a reasonable compromise between size and performance.
CompressionNormal
// CompressionMaximum is optimized for size.
CompressionMaximum
// CompressionFast is optimized for performance.
CompressionFast
// CompressionSuperFast is optimized for super performance.
CompressionSuperFast
)

// A Part is a stream of bytes defined in ISO/IEC 29500-2 §9.1..
// Parts are analogous to a file in a file system or to a resource on an HTTP server.
// The part properties will be validated before writing or reading from disk.
Expand Down
13 changes: 0 additions & 13 deletions relationship.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,6 @@ const (

const externalMode = "External"

const (
// RelTypeMetaDataCoreProps defines a core properties relationship.
RelTypeMetaDataCoreProps = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"
// RelTypeDigitalSignature defines a digital signature relationship.
RelTypeDigitalSignature = "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/signature"
// RelTypeDigitalSignatureOrigin defines a digital signature origin relationship.
RelTypeDigitalSignatureOrigin = "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/origin"
// RelTypeDigitalSignatureCert defines a digital signature certificate relationship.
RelTypeDigitalSignatureCert = "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/certificate"
// RelTypeThumbnail defines a thumbnail relationship.
RelTypeThumbnail = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail"
)

// Relationship is used to express a relationship between a source and a target part.
// The only way to create a Relationship, is to call the Part.CreateRelationship()
// or Package.CreateRelationship(). A relationship is owned by a part or by the package itself.
Expand Down
18 changes: 17 additions & 1 deletion writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@ import (

const opcCtx = "opc"

// CompressionOption is an enumerable for the different compression options.
type CompressionOption int

const (
// CompressionNone disables the compression.
CompressionNone CompressionOption = iota - 1
// CompressionNormal is optimized for a reasonable compromise between size and performance.
CompressionNormal
// CompressionMaximum is optimized for size.
CompressionMaximum
// CompressionFast is optimized for performance.
CompressionFast
// CompressionSuperFast is optimized for super performance.
CompressionSuperFast
)

// Writer implements a OPC file writer.
type Writer struct {
p *Package
Expand All @@ -26,7 +42,7 @@ func NewWriter(w io.Writer) *Writer {
// Flush flushes any buffered data to the underlying writer.
// Part metadata, relationships, content types and other OPC related files won't be flushed.
// Calling Flush is not normally necessary; calling Close is sufficient.
// Useful to do simultaneos writing and reading.
// Useful to do simultaneous writing and reading.
func (w *Writer) Flush() error {
return w.w.Flush()
}
Expand Down

0 comments on commit 907a36c

Please sign in to comment.