You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: fieldindexer.go
    path of file: ./repos/openyurt/pkg/yurtmanager/controller/platformadmin/utils
    
    the code of the file until where you have to start completion: /*
Copyright 2023 The OpenYurt Authors.

Licensed under the Apache License, Version 2.0 (the License
    
func RegisterFieldIndexers(fi client.FieldIndexer) error {
	var err error
	registerOnce.Do(func() {
		// register the fieldIndexer for device
		if err = fi.IndexField(context.TODO(), &v1alpha2.PlatformAdmin{}, IndexerPathForNodepool, func(rawObj client.Object) []string {
			platformAdmin, ok := rawObj.(*v1alpha2.PlatformAdmin)
			if ok {
				return []string{platformAdmin.Spec.PoolName}
			}
			return []string{}
		}); err != nil {
			return
		}
	})

	return err
}