@@ -17,11 +17,11 @@ import (
1717	"github.com/google/uuid" 
1818	"github.com/ipfs/go-cid" 
1919	"github.com/ipfs/go-graphsync" 
20- 	"github.com/libp2p/go-libp2p-core/metrics" 
21- 	"github.com/libp2p/go-libp2p-core/network" 
22- 	"github.com/libp2p/go-libp2p-core/peer" 
23- 	"github.com/libp2p/go-libp2p-core/protocol" 
2420	pubsub "github.com/libp2p/go-libp2p-pubsub" 
21+ 	"github.com/libp2p/go-libp2p/core/metrics" 
22+ 	"github.com/libp2p/go-libp2p/core/network" 
23+ 	"github.com/libp2p/go-libp2p/core/peer" 
24+ 	"github.com/libp2p/go-libp2p/core/protocol" 
2525	"github.com/multiformats/go-multiaddr" 
2626
2727	datatransfer "github.com/filecoin-project/go-data-transfer" 
@@ -45,6 +45,8 @@ import (
4545	"github.com/filecoin-project/lotus/node/repo/imports" 
4646	"github.com/filecoin-project/lotus/storage/sealer/sealtasks" 
4747	"github.com/filecoin-project/lotus/storage/sealer/storiface" 
48+ 	"golang.org/x/text/cases" 
49+ 	"golang.org/x/text/language" 
4850)
4951
5052var  ExampleValues  =  map [reflect.Type ]interface {}{
@@ -363,7 +365,7 @@ func exampleStruct(method string, t, parent reflect.Type) interface{} {
363365		if  f .Type  ==  parent  {
364366			continue 
365367		}
366- 		if  strings .Title (f .Name ) ==  f .Name  {
368+ 		if  cases .Title ( language . Und ,  cases . NoLower ). String (f .Name ) ==  f .Name  {
367369			ns .Elem ().Field (i ).Set (reflect .ValueOf (ExampleValue (method , f .Type , t )))
368370		}
369371	}
0 commit comments