Skip to content

Commit fa4ea3b

Browse files
authored
build: add gofmt to format make target (#252)
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent 72d05a1 commit fa4ea3b

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ mod-tidy:
2525
clean:
2626
rm -f $(BINARIES)
2727

28-
format:
28+
format: mod-tidy
2929
go fmt ./...
30+
gofmt -s -w $(GO_FILES)
3031

3132
golines:
3233
golines -w --ignore-generated --chain-split-dots --max-len=80 --reformat-tags .

internal/config/profile.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ func GetAvailableProfiles() []string {
4040
var Profiles = map[string]Profile{
4141
// This (default) profile corresponds to the values specified in:
4242
// https://github.com/blinklabs-io/cardano-dns/blob/main/README.md
43-
"cardano-preprod-testing": Profile{
43+
"cardano-preprod-testing": {
4444
Network: "preprod",
4545
Tld: "cardano",
4646
PolicyId: "6af60c2a7a06551ef09b3810a41d086b26ca26f926d22e462103194d",
4747
ScriptAddress: "addr_test1vr75xezmpxastymx985l3gamuxrwqdwcfrcnjlygs55aynsqu3edq",
4848
InterceptSlot: 50844079,
4949
InterceptHash: "81325118471fddb00a20327572b371aee7cce13b846a18500d011b9cefd2a34c",
5050
},
51-
"ada-preprod": Profile{
51+
"ada-preprod": {
5252
Network: "preprod",
5353
Tld: "ada",
5454
PolicyId: "32c89cdb9c73b904ae0fd230770ee082d6e5fe090b20eaa08ee70dd3",
@@ -57,7 +57,7 @@ var Profiles = map[string]Profile{
5757
InterceptSlot: 65308876,
5858
InterceptHash: "435703531e57bfe9b4d309e7360efc43e04d06531c9393530c57bebf029ec634",
5959
},
60-
"hydra-preprod": Profile{
60+
"hydra-preprod": {
6161
Network: "preprod",
6262
Tld: "hydra",
6363
PolicyId: "f5f8228a4bd56704ad3c612ecc74e5d2e5d15292b8cae3aaa8065fc1",
@@ -66,7 +66,7 @@ var Profiles = map[string]Profile{
6666
InterceptSlot: 67799029,
6767
InterceptHash: "4815dae9cd8f492ab51b109ba87d091ae85a0999af33ac459d8504122cb911f7",
6868
},
69-
"auto-preprod": Profile{
69+
"auto-preprod": {
7070
Network: "preprod",
7171
PolicyId: "63cdaef8b84702282c3454ae130ada94a9b200e32be21abd47fc636b",
7272
DiscoveryAddress: "addr_test1xrhqrug2hnc9az4ru02kp9rlfcppl464gl4yc8s8jm5p8kygc3uvcfh3r3kaa5gyk5l2vgdl8vj8cstslf4w2ajuy0wsp5fm89",

internal/dns/dns.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ func Start() error {
6262
go startListener(serverTcp)
6363
// TLS listener
6464
if cfg.Tls.CertFilePath != "" && cfg.Tls.KeyFilePath != "" {
65-
listenTlsAddr := fmt.Sprintf("%s:%d", cfg.Dns.ListenAddress, cfg.Dns.ListenTlsPort)
65+
listenTlsAddr := fmt.Sprintf(
66+
"%s:%d",
67+
cfg.Dns.ListenAddress,
68+
cfg.Dns.ListenTlsPort,
69+
)
6670
serverTls := &dns.Server{
6771
Addr: listenTlsAddr,
6872
Net: "tcp-tls",

internal/logging/logging.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ func Configure() {
3838
if a.Key == slog.TimeKey {
3939
// Format the time attribute to use RFC3339 or your custom format
4040
// Rename the time key to timestamp
41-
return slog.String("timestamp", a.Value.Time().Format(time.RFC3339))
41+
return slog.String(
42+
"timestamp",
43+
a.Value.Time().Format(time.RFC3339),
44+
)
4245
}
4346
return a
4447
},

0 commit comments

Comments
 (0)