Skip to content

Commit

Permalink
Added usage examples
Browse files Browse the repository at this point in the history
  • Loading branch information
andyone committed Aug 23, 2019
1 parent a4ced5f commit a655a06
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions examples_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package jar

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2009-2019 ESSENTIAL KAOS //
// Essential Kaos Open Source License <https://essentialkaos.com/ekol> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //

import (
"fmt"
)

// ////////////////////////////////////////////////////////////////////////////////// //

func Example_ReadFile() {
manifest, err := ReadFile("wagon-file-3.3.2.jar")

fmt.Printf("Error: %v\n", err)
fmt.Printf("Specification-Vendor: %s\n", manifest["Specification-Vendor"])
fmt.Printf("Implementation-Vendor-Id: %s\n", manifest["Implementation-Vendor-Id"])
fmt.Printf("Specification-Version: %s\n", manifest["Specification-Version"])
}

0 comments on commit a655a06

Please sign in to comment.