~xdavidwu/himitsu-docker

63b6754ba602db4643717888f2e9b9b2ae8e1895 — Pinghao Wu 3 months ago ae014f9 main
update for himitsu 0.8
2 files changed, 2 insertions(+), 8 deletions(-)

M cmd/docker-credential-himitsu/get.ha
M cmd/docker-credential-himitsu/list.ha
M cmd/docker-credential-himitsu/get.ha => cmd/docker-credential-himitsu/get.ha +1 -1
@@ 24,7 24,7 @@ fn get(hi: net::socket) void = {
	const json = json::newobject();
	defer json::finish(json);
	const query = match (client::next(&iter)!) {
	case void =>
	case done =>
		// see go github.com/docker/docker-credential-helpers/client
		// client.go
		fmt::println("credentials not found in native keychain")!;

M cmd/docker-credential-himitsu/list.ha => cmd/docker-credential-himitsu/list.ha +1 -7
@@ 18,13 18,7 @@ fn list(hi: net::socket) void = {
	const iter = client::query(hi, client::operation::QUERY, &query, 0)!;
	const json = json::newobject();
	defer json::finish(json);
	for (true) {
		const query = match (client::next(&iter)!) {
		case void =>
			break;
		case let q: query::query =>
			yield q;
		};
	for (const query => client::next(&iter)!) {
		defer query::finish(&query);
		let hosti = 0z, usernamei = 0z;
		for (let i = 0z; i < len(query.items); i += 1) {