Skip to content

Commit

Permalink
fix: remove dead dnslink code
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentsenta committed Apr 7, 2023
1 parent d2c690c commit 928d79d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 60 deletions.
39 changes: 0 additions & 39 deletions dnslinkgen.go

This file was deleted.

22 changes: 1 addition & 21 deletions tooling/dnslink/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"encoding/json"
"fmt"
"os"
"strings"
)

func Aggregate(inputPaths []string) (map[string]string, error) {
Expand Down Expand Up @@ -41,23 +40,4 @@ func Merge(inputPaths []string, outputPath string) error {

err = os.WriteFile(outputPath, j, 0644)
return err
}

func AsEnv(inputPaths []string, outputPath string) error {
kvs, err := Aggregate(inputPaths)
if err != nil {
return err
}

var kvsStr []string
for k, v := range kvs {
kvsStr = append(kvsStr, fmt.Sprintf("%s:%s", k, v))
}

env := strings.Join(kvsStr, ",")
env = "export IPFS_NS_MAP=\"" + env + "\""

err = os.WriteFile(outputPath, []byte(env), 0644)

return err
}
}

0 comments on commit 928d79d

Please sign in to comment.