Sample code to create config and perform actions

Is there a sample code to create dynamic config and perform actions like copy/sync programmatically in go?

Explored using fs.configmap and fs.newfs("backend:") but gives config not found error.

No there isn't...

You should be able to make a configmap and call fs.NewFs - can you post the code you tried?