add bin/ to path and provide path to file as argument
bin/
# go go-sum.sed path/to/go.sum # rust cargo-lock.sed < path/to/Cargo.lock
or call script from sed with -nf flags
-nf
sed -nf path/to/go-sum.sed < path/to/go.sum