Skip to content

Commit

Permalink
Chore: Remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
zsrv committed Feb 14, 2023
1 parent e555525 commit 6cce62e
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions pkg/nonjson/product_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"bufio"
"bytes"
"encoding/base64"
"errors"
"fmt"
"github.com/zsrv/supermicro-product-key/pkg/oob"
"strconv"
Expand All @@ -26,24 +25,6 @@ func NewProductKey() *ProductKey {
}
}

// NewProductKeyForSKU returns a new ProductKey for the given license SKU,
// or an error if the SKU could not be matched to a software identifier.
func NewProductKeyForSKU(sku string) (*ProductKey, error) {
if sku == "" {
return nil, errors.New("sku must not be empty")
}

pk := NewProductKey()

softwareIdentifier, err := SoftwareIdentifiers.BySKU(sku)
if err != nil {
return nil, err
}
pk.SoftwareIdentifier = *softwareIdentifier

return pk, nil
}

type ProductKey struct {
// FormatVersion is the format version of the product key.
// The only valid value is 0.
Expand Down

0 comments on commit 6cce62e

Please sign in to comment.