Skip to content

Commit

Permalink
Add usage example
Browse files Browse the repository at this point in the history
  • Loading branch information
andyone committed May 11, 2023
1 parent e046e36 commit 105b3f5
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions example_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package depsy

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2023 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //

import (
"fmt"
"os"
)

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

func ExampleExtract() {
data, err := os.ReadFile("go.mod")

if err != nil {
panic(err.Error())
}

deps := Extract(data, true)

for _, dep := range deps {
fmt.Println(dep)
}
}

0 comments on commit 105b3f5

Please sign in to comment.