// Capabilities writes a '100 Capabilities' message.
//
// Version must be non-empty. caps may be 0 for no capabilities, though
// it probably should at least be CapSendConfig (or CapDefault)
Capabilities writes a '100 Capabilities' message.

Version must be non-empty. caps may be 0 for no capabilities, though
it probably should at least be CapSendConfig (or CapDefault)
// Capabilities writes a ' 100 Capabilities ' message . // // Version must be non - empty . caps may be 0 for no capabilities though // it probably should at least be CapSendConfig ( or CapDefault )
func (mw *MessageWriter) Capabilities(version string, caps CapFlags) {
	fmt.Fprintf(mw.w, "100 Capabilities\nVersion: %s\n", version)
	if caps&CapSendConfig != 0 {
		mw.w.Write([]byte("Send-Config: true\n"))
	}
	if caps&CapPipeline != 0 {
		mw.w.Write([]byte("Pipeline: true\n"))
	}
	if caps&CapSingleInstance != 0 {
		mw.w.Write([]byte("Single-Instance: true\n"))
	}
	if caps&CapLocalOnly != 0 {
		mw.w.Write([]byte("Local-Only: true\n"))
	}
	if caps&CapNeedsCleanup != 0 {
		mw.w.Write([]byte("Needs-Cleanup: true\n"))
	}
	if caps&CapRemovable != 0 {
		mw.w.Write([]byte("Removable: true\n"))
	}
	if caps&CapAuxRequests != 0 {
		mw.w.Write([]byte("AuxRequests: true\n"))
	}
	mw.w.Write([]byte("\n"))
}
func ( mw * MessageWriter ) Capabilities ( version string , caps CapFlags ) { fmt . Fprintf ( mw . w , " \n \n " , version ) if caps & CapSendConfig != 0 { mw . w . Write ( [ ] byte ( " \n " ) ) } if caps & CapPipeline != 0 { mw . w . Write ( [ ] byte ( " \n " ) ) } if caps & CapSingleInstance != 0 { mw . w . Write ( [ ] byte ( " \n " ) ) } if caps & CapLocalOnly != 0 { mw . w . Write ( [ ] byte ( " \n " ) ) } if caps & CapNeedsCleanup != 0 { mw . w . Write ( [ ] byte ( " \n " ) ) } if caps & CapRemovable != 0 { mw . w . Write ( [ ] byte ( " \n " ) ) } if caps & CapAuxRequests != 0 { mw . w . Write ( [ ] byte ( " \n " ) ) } mw . w . Write ( [ ] byte ( " \n " ) ) }
Capabilities writes a '100 Capabilities' message.
Capabilities writes a ' 100 Capabilities ' message .